Add Class wizard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I begin typing the name of a class to add, it simultaneously begins to appear in the .h and .cpp fields----unless the class name begins with C (capital C). For example, if I try to name the class Complex, I ge

Complex for the class name bu
omplex.h and omplex.cpp for the other file names

Every other beginning letter (including lower-case c) seems to give .h and .cpp files with the same name as the class
Please help.
 
This is a standard naming convention in C++. At least with Microsoft... The
wizard assumes you will start your class with a "C" (as in CWindow, CButton,
etc. similar to MFC classes) but not the actual name of the ".h" and ".cpp"
files. Therefore it ignores the first "C" that is typed. Either use the
convention of starting your classes with a "C" or simply change the name of
the ".h" and ".cpp" files before clicking "OK" to exit the wizard....


Davis said:
When I begin typing the name of a class to add, it simultaneously begins
to appear in the .h and .cpp fields----unless the class name begins with C
(capital C). For example, if I try to name the class Complex, I get
Complex for the class name but
omplex.h and omplex.cpp for the other file names.

Every other beginning letter (including lower-case c) seems to give .h and
..cpp files with the same name as the class.
 
Thank you. I didn't know about that convention, as I'm just learning. It was quite puzzling.
 
Back
Top