C++ Code in header files

  • Thread starter Thread starter Mauro Tronto
  • Start date Start date
M

Mauro Tronto

Hello, If you start a new c++ .net project (windows form) the IDE shows
window and generate 2 files (.cpp and .h). If I simple drag and drop button
control into the form and double click the button, the IDE shows me a method
"template" where I can write my code. I wonder why the IDE creates the
template in .h (header) file instead of .cpp file. I've always write
scheleton C++ class in header file and implementation code in .cpp file.
Thanks for help
Mauro
 
Mauro Tronto said:
Hello, If you start a new c++ .net project (windows form) the IDE shows
window and generate 2 files (.cpp and .h). If I simple drag and drop
button control into the form and double click the button, the IDE shows me
a method "template" where I can write my code. I wonder why the IDE
creates the template in .h (header) file instead of .cpp file. I've always
write scheleton C++ class in header file and implementation code in .cpp
file.

Bottom line because the wizards were designed to generate C# code which does
not use a separate header file.

-cd
 
Thanks Carl for reply.
Are there any changes in Whidbey? I've see that in C++ 2005 express is just
the same: code in header file ;-(
Mauro
 
No changes for Whidbey. We investigated changing this, but it turns out the
single file assumption is baked very deeply in the architecture of the
designers. We are looking ways to change it in future releases, but it will
be far from trivial.

Ronald Laeremans
Visual C++ team
 
Back
Top