Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with TIdSocketHandles

Status
Not open for further replies.

RRoYY

Programmer
Joined
Feb 9, 2006
Messages
2
Location
MU
Hi,
I have the borland studio 2006 version and running indy9 bcoz indy10 not running with c++. I have a problem when declaring a variable 'Bindings' of type TIdSocketHandles, that is a collection of TIdSocketHandle to start the tcpserver.

void __fastcall TMainFormServer::FormCreate(TObject *Sender){
TIdSocketHandles Bindings= new TIdSocketHandles;
...
}
I am getting this error -- [C++ Error] Screen.cpp(83): E2285 Could not find a match for 'TIdSocketHandles::TIdSocketHandles()'
[C++ Error] Screen.cpp(83): E2285 Could not find a match for 'TIdSocketHandles::TIdSocketHandles(const TIdSocketHandles&)'

even when i try TIdSocketHandles->....the list of methods/properties does not show up!

Note.. I am trying to convert the code from delphi to c++ for the following tutorial:
Thanks for helping!
 
I found the solution myself.
In fact when converting from delphi to c++ the variable 'Bindings' becomes a pointer as thus:

TIdSocketHandles *Bindings= new TIdSocketHandle(TCPServer);
Also instead of calling the function in the form oncreate event, the initialisation should be done in the form constructor - good practice for c++!

Anybody interested in having the c++ version (commented), don't hesitate to post here with!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top