The user types in IP and Port. The app reads the textboxes when a button is clicked.
init(port, ip){....RemoteAddress.sin_addr.s_addr = inet_addr(ip);RemoteAddress.sin_port = port;..}
problem is the conversion. ip is null-terminated char and port is unsigned short int.
port = portBox->Text;ip = ipBox->Text->ToCharArray();ip[ipBox->Text->Length()+1] = "\0";init(port, ip);
I only get errors:
cannot convert from 'System::String ^' to 'unsigned short'
error C2440: '=' : cannot convert from 'cli::array<Type,dimension> ^' to 'char [32]
error C2064: term does not evaluate to a function taking 0 arguments
any help is appreciated