using namespace std error

using namespace std error

Post by Z29sZGVuc2 » Wed, 20 Jul 2005 09:18:03


i'm sure this is an easy question to answer but i get comiler error 2871
(namespace doesn't exist) when i try to use namespace 'std' in a .Net dll
project..thanks in advance
 
 
 

using namespace std error

Post by Carl Danie » Wed, 20 Jul 2005 09:42:44


Have you #included any standard headers?

-cd

 
 
 

using namespace std error

Post by Z29sZGVuc2 » Wed, 20 Jul 2005 13:57:02

yes..#include <stdlib.h>
 
 
 

using namespace std error

Post by Arnaud Deb » Wed, 20 Jul 2005 15:16:32


stdlib.h is a C header that doesn't define any namespace. Try to #include
<stdlib>, <exception>, <algorithm>, <vector> or whatever other STL header.

Arnaud
MVP - VC
 
 
 

using namespace std error

Post by Heinz Ozwi » Wed, 20 Jul 2005 17:29:48

"Arnaud Debaene" < XXXX@XXXXX.COM > schrieb im Newsbeitrag



The first one should be <cstdlib>

Heinz
 
 
 

using namespace std error

Post by Z29sZGVuc2 » Wed, 20 Jul 2005 22:44:01

yes <cstdlib> works..thanks everyone
 
 
 

using namespace std error

Post by adebaen » Thu, 21 Jul 2005 00:18:33


Heinz Ozwirk a rit :


Yerk! Typo mistake! You're right of course...

Arnaud
MVP - VC