I don't have string.h can't you post it?
Printable View
I don't have string.h can't you post it?
string.h is part of the Standard C Library.
string is part of the Standard C++ Library.
Therefore you must have them :)
C:\Windows\Desktop\C++\count to a billion\billion.cpp(8) : error C2065: 'string' : undeclared identifierCode:#include<iostream>
#include <string>
int main()
{
cout<<"enter your name: ";
string name;
cin>>name;
cout<<name;
return 0;
}
C:\Windows\Desktop\C++\count to a billion\billion.cpp(8) : error C2146: syntax error : missing ';' before identifier 'name'
C:\Windows\Desktop\C++\count to a billion\billion.cpp(8) : error C2065: 'name' : undeclared identifier
You forgot your using namespace std; :p
isn't that quite frustrating
I still get this: no idea how to start reading it hehe
no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there i
s no acceptable conversion)