www.digitalmars.com         C & C++   DMDScript  

c++.stl.port - DMC's compatibility w/ namespaces

reply Daniel Jomphe <Daniel_member pathlink.com> writes:
Hi,

Is DMC at all compatible with any namespace?
And if not, how would be STLPort compatible with DMC?

Whenever I write the next statement, I get the associated error:

using namespace std;
^
MyApp.cpp(16) : Error: identifier expected

..thank you!

Daniel Jomphe
Nov 08 2002
parent reply Christof Meerwald <cmeerw web.de> writes:
On Fri, 8 Nov 2002 19:04:51 +0000 (UTC), Daniel Jomphe wrote:
 Is DMC at all compatible with any namespace?
 And if not, how would be STLPort compatible with DMC?
STLport for DM uses something like "#define std", so you can write something like std::string or "using std::string", but you can't write "using namespace std;"
 using namespace std;
 ^
 MyApp.cpp(16) : Error: identifier expected
As these std namespaces are currently ignored anyway, you could enclose it in an "#ifndef __DMC__" until DM gets proper namespace support. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Nov 08 2002
parent Daniel Jomphe <Daniel_member pathlink.com> writes:
 Is DMC at all compatible with any namespace?
 And if not, how would be STLPort compatible with DMC?
STLport for DM uses something like "#define std", so you can write something like std::string or "using std::string", but you can't write "using namespace std;"
 using namespace std;
 ^
 MyApp.cpp(16) : Error: identifier expected
As these std namespaces are currently ignored anyway, you could enclose it in an "#ifndef __DMC__" until DM gets proper namespace support.
Thank you very much.
Nov 08 2002