when I use this:
Code:
string reason( "connect() failed" );
throw ( logic_error( reason ) ); // this is line 65.
I get the following compile-time errors:
Code:
C:\Ruchikar\RnD\wbsrvc1\Session.cpp(65) : error C2061: syntax error : identifier 'reason'
C:\Ruchikar\RnD\wbsrvc1\Session.cpp(65) : error C2066: cast to function type is illegal
C:\Ruchikar\RnD\wbsrvc1\Session.cpp(65) : error C2059: syntax error : ';'
But using this:
Code:
throw ( logic_error( string( "connect() failed." ) ) );
works just fine! What's the difference?
I'm using MS VC++ on Win2K.
Thanks in advance.