|
From: patche <pa...@ro...> - 2002-02-12 19:36:14
|
I am new to programming and have a huge story on all of the compiler/IDEs=
that I've tried until I found DevCPP kudos to everyone involved.
There was a question that was asked about gett cin.get() to work. I don't=
know why but I had the same problem and the book with which I am teaching=
myself or some other tutorial I was reading can't recall, suggested that I=
use cin.get() twice, like so:
//template.cpp - Template for CPP
#include <iostream>
using namespace std;
int main()
{
cin.get();
cin.get();
return 0;
}
So far, I haven't found any conflicts. With what I know I will suggest=
that the problem lies in the language itself. I was studying the section=
concerning strings and began to notice that the compiler actually hides=
alot of useful stuff that would be good to know. For instance, the=
compiler will take a carriage return [ENTER] for a "\n" character and then=
the newline character will be replaced with a null value "\0" of course=
the "\0" represents yet another number.
I don't know if the explanation helps but I am sure putting it in twice=
will.
Thanks
Patche
|