hello
i started to learn in this site and i don't understend what is the commend cin please help me
hello
i started to learn in this site and i don't understend what is the commend cin please help me
Inreasonably practical terms cin is the "command" to take information from the standard input source (usually the keyboard), store the information in a designated section of memory (the variable you specify), and (usually) display the information on the standard display source (usually the monitor screen). In a more technical sphere it is a predeclared global instance of the istream class, but there is no reason to get technical at your stage of the game.
More specifically, cin is a function which exploits two major C++ mechanisms:Inreasonably practical terms cin is the "command" to take information from the standard input source (usually the keyboard), store the information in a designated section of memory (the variable you specify), and (usually) display the information on the standard display source (usually the monitor screen). In a more technical sphere it is a predeclared global instance of the istream class, but there is no reason to get technical at your stage of the game.
1) Overloaded operator.
So you don't have to do 'cin(input);', instead you do 'cin >> input;'
2) Overloaded parameters.
'cin' is actually several functions, each written to accept a given datatype( one for int's, one for char*, etc, etc.
cin does NOT display to the moniter. This is handled by the operating sytem thru the keyboard...
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
No it isn't. cin is an object. As has already been said it is a predeclared instance of istream.More specifically, cin is a function
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
It's an input stream.
I always called it console in (cin).
Then it's opposite console out (cout).
That keeps things simple.
its an input stream, it is a predefined instance of an object and if i remember correctly it is also buffered.
Monday - what a way to spend a seventh of your life
Thank guy now can i get an example on how to use the cin command
I'm losing it! Is the year 2002?
Devoted my life to programming...
Closed. Please dont bump old threads