IDE bug? ..Please help with <string>!

Sorry for my bad english…
Code is:
#include <iostream.h>
#include
#include

int main()
{
basic_string c;
basic_string z=“h”;
c=“gf”;
string tmp=“g”;
c.copy( tmp.begin(), c.size() );
cout << c << endl;
return 0;
}
I don’t understand why compiler gives message, that “basic_string” not found. Calling “copy” function although gives an error.
Maybe i must link some libraries?
What’s wrong with my programm?

Mitek,

Why are you using basic_string instead of the normal C++ string variable that apparently compiled without any problems?

Most C++ code just uses:

string c;
c = “gf”;
string tmp = “g”;

tmp = c;

Tim

ok, but compiler cannot find function “copy”…
it’s the most problem!
I found full annotation in HELP to , but i still don’t understand,
what can be wrong with this simple programm :frowning:

These are all part of the std namespace so you need to do prefix this stuff with std: “std::basic_string” or use “using std;”

But as Tim said std::string if most often used.

std::string c(“gf”);
std::string tmp(“g”);
tmp = c;