Here is the compile error I am getting. I cannot understand why it keeps saying ip_ptr is an int. I clearly have initialized it as a pointer to a char.
>c:\users\user\documents\visual studio 2008\projects\amibas\amibas\amibas.cpp(33) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\user\documents\visual studio 2008\projects\amibas\amibas\amibas.cpp(33) : error C2040: 'ip_ptr' : 'int' differs in levels of indirection from 'char *'
1>c:\users\user\documents\visual studio 2008\projects\amibas\amibas\amibas.cpp(33) : error C2440: 'initializing' : cannot convert from 'char *' to 'int'
Now that you know that the global (white space) is really there for variable declarations and thing like that - you continued to think a bit more and realised that your problem would have been solved
like this:
Of course you would then carry on thinking and realize that if ip to to be a global variable
that you plan to use and modify some more time in you code, then an array of 14 chars is useless for an ip address which can be 192.169.100.100 which is 15 chars - which means an array of 16 chars (to include the terminating 0).
BUT if the iparray was made sole for the purpose of initializing the connection_worked variable and will only be used once - then it is redundant because you
could do this: