my first trying with c++.net please help me

  • Thread starter Thread starter Rem
  • Start date Start date
R

Rem

I'm trying to understand how is it possible implement
function inside a .h file and not in a .cpp leaving
the .h only for the prototype.
For example:
private: ......
........
........
private: System::Void NewClick(System::Object * sender,
System::EventArgs * e)
{
//
}

how can this function stay inside a .h file?
 
if is perfectly legal to put function implementations in the class
prototype.
this is standard c++ behavior.
for example:

class test
{
public:
test()
{
//put constructor code here
}
};

that way you don't have to have a cpp file. the disadvantage with this is
that you can't compile
a header file in the visual studio IDE, so you will not know if your class
works before you use it somewhere.

kind regards,
Bruno.
 
Back
Top