"string" is undefined

hey does anyone knwo why do i get an Error: identifier "string" is undefined. when i use this code in a class header file...
1
2
3
4
5
6
7
8
9
10
11
#pragma once
#include <string>

class newproduct
{
public:
	newproduct(void);
	~newproduct(void);
	string add();
};
string is in the std namespace, so you need to write std::string.
thanks you're right
Topic archived. No new replies allowed.