- Aug 4, 2001
- 967
- 0
- 0
I'm having trouble compiling stl code in Visual C++. I'm getting the error "'std' is not a class or namespace name"
Can you find the error in this piece of code?? I guess std is defined as a namespace in some .h somewhere, but I've tried about everyone I could think of (stdio, stddef, stdlib, etc) with no success.
#ifndef MYCLASS
#define MYCLASS
#include <list.h>
#include <stdlib.h>
using std::list;
class myclass
{
public:
myclass();
~myclass();
private:
std::list<object> mylist;
};
#endif
Can you find the error in this piece of code?? I guess std is defined as a namespace in some .h somewhere, but I've tried about everyone I could think of (stdio, stddef, stdlib, etc) with no success.
#ifndef MYCLASS
#define MYCLASS
#include <list.h>
#include <stdlib.h>
using std::list;
class myclass
{
public:
myclass();
~myclass();
private:
std::list<object> mylist;
};
#endif