beginning with cplusplus!!!!!

Pages: 12
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 - using namespace 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.
http://www.cplusplus.com/reference/iostream/istream/getline/
http://www.cplusplus.com/reference/string/getline/

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.

Download a newer version.

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 ???
It is because perhaps TurboC++ expects ".h" in the end.
Try using a new version.

I dont use an IDE. I edit my programs in vi and compile them on command line using gcc.
closed account (z05DSL3A)
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/
Topic archived. No new replies allowed.
Pages: 12