Quote:
|
Originally Posted by Valmont
|
thanks for the link .. so the code which i posted is now working but ..

Note my next problem
#include <iostream>
#include <string>
using namespace std;
int main()
{
String Firstname;
Int ID;
cout <<"Enter ur name";
cin >> Firstname;
cout <<"Your id";
cin >> ID;
cout <<"Your name is" << Firstname << "and id is" << ID << endl;
return 0;
}
So when i run it, it says something like that :
D:\Dev-Cpp\Untitled1.cpp In function `int main()':
D:\Dev-Cpp\Untitled1.cpp `String' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
D:\Dev-Cpp\Untitled1.cpp `Int' undeclared (first use this function)
D:\Dev-Cpp\Untitled1.cpp `Firstname' undeclared (first use this function)
D:\Dev-Cpp\Untitled1.cpp `ID' undeclared (first use this function)
LOL am i that erroneous ?
Anyways, wat i can't understand in the above code is that how to assign a variable ..
Any idea .. ?
(Original COde taken from :
http://cplus.about.com/od/beginnerct.../aa022302a.htm)
cout <<"Thanks for the interest";
}
:d