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?
Bruno van Dooren - 31 Dec 2003 08:08 GMT
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.
> I'm trying to understand how is it possible implement
> function inside a .h file and not in a .cpp leaving
[quoted text clipped - 10 lines]
>
> how can this function stay inside a .h file?