You use #include <string> and #include <iostream> .
As you aren't using the std namespace, you will need to add a std:: prefix or you will have to declare that you are using the namespace by entering after your #includes - usingnamespace std;
Your compiler doesn't show anything - it is most likely your IDE that is highlighting keywords. You will have to set up your own settings to see what keywords turn into what colours.
The compilation problem in the second case are because your version of Turbo C++ may not have the strings library included with it. Check for string.h in the include folder. So it does not recognise string as a keyword resulting in it not being displayed in a specific color.
yes it is there in include. still m finding this error. moreover my IDE is not allowing using namespace std;
using it in my code gives me declaration syntax error[i/]
moreover if i m writing # include<string> # include<iostream>
it gives me error sayin[i] no include file name string is there
what should i do... should i install some other IDE ... what IDE u use mgupta ???
Turbo C++ it is old, very old. C++ has moved on since then.
If you don't have a good reason for learning 'old school' C++ then it would be best to cut your losses and get hold of a newer compiler/IDE and learn standard C++.
Compilers, IDEs, Debuggers and the Jazz
http://www.cplusplus.com/forum/articles/7263/