Quote:
|
Originally Posted by spinach-guy
I am using bloodshed Cev C++ which i got from a Digit CD
|
First of all it is good that you are using Dev C++ which is a good C++ compiler.
Quote:
using namespace std;
Without using this,i get error like cin,cout not defined...something like that
|
It is needed. Read more about namespace. It is a new concept introduced in ISO C++. It is needed in most of the new version compilers.
Quote:
|
No need to use cin.get(). That too for 2 times!!!
|
Quote:
|
Originally Posted by spinach-guy
What's the exact use of this function.has it got something to do with user needing to press enter to continue??also what's the use of cin.ignore()??
|
This is not needed. It was a function used to get a single character from input stream. It is just a way to get character from keyboard like getch() or getche() used in C. For your program it is not needed at all. Read more about 'cin' from whichever book you are using. I would suggest Balaguruswamy as a good book to beginners. There are others also but this does provide a better explaination about all the things related to STL for the beginners.