while trying to match the argument list '(std::istream, const char)'
2>c:\users\fuzzy\documents\visual studio 2010\projects\test\client\client.cpp(37): error C2664: 'inet_addr' : cannot convert parameter 1 from 'const char' to 'const char *'
2> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I am working with sockets. I am trying put in some small code to enter your own server ip address. So above is my problem. I'll copy the source code below.
You can't have it const if you want the user to be able to input stuff.
Also, you need it to be a pointer if you want to store a C-string.
Finally, you'll need to allocate memory for the string.
I'd suggest just using an std::string and .c_str() instead though.
What if I wanted to read in from a .ini file? Or could you give me some good google key words to search for? That's what I really want to do is when I complie have a text file made that has a default config.ini file.