Quote:
Originally posted by SilentStrike
not string.h, <string>
That said, it has me puzzled.
If the following is acceptable, then logic_error an take a string (or a type that can convert to one).
throw ( logic_error( string( "connect() failed." ) ) );
But, this then fails
string reason( "connect() failed" );
throw ( logic_error( reason ) ); // this is line 65.
Which is almost the same thing. logic_error is still getting construced with a string as a parameter.
Ah, silly namespaces ;) Yes, I always was puzzled on why the first way didn't work and an almost identical second did not. The first 3 errors though usually mean the header file was missing.