Board index » cppbuilder » How do I create TNMUDP under runtime?

How do I create TNMUDP under runtime?


2003-10-10 07:09:58 AM
cppbuilder52
the help said must use Create().
I wrote:
TNMUDP * MyUdp;
MyUdp=new TNMUDP(this);//compile error
who can help me?thanks
 
 

Re:How do I create TNMUDP under runtime?

"hawkfly" < XXXX@XXXXX.COM >wrote in message
Quote
the help said must use Create().
The help is gearded towards Delphi, not C++. In Delphi, there is a
'constructor' keyword, so constructors can be named anything the programmer
wants. "Create" is the most commonly used name. In C++, however, there is
no 'constructor' keyword, constructors are always named the same as the
class name.
Quote
TNMUDP * MyUdp;
MyUdp=new TNMUDP(this);//compile error
That is the correct code for C++. What is the actual error you are seeing?
Gambit