|
From: Ioannis V. <no...@ya...> - 2002-02-12 23:54:13
|
The problem doesn;t lie in the language itself, it lies on its use by us. :) Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.d2g.com/> http://www.noicys.d2g.com * Alternative URL: <http://run.to/noicys> http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of patche Sent: Tuesday, February 12, 2002 4:43 PM To: dev...@li... Subject: [Dev-C++] cin.get() 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 |