+ 1

I am a newbie ... help me with some terms please

what does mean? iostream namespace std cout return 0

14th May 2018, 3:23 AM
Shander Vlogs
Shander Vlogs - avatar
2 odpowiedzi
+ 1
iostream is a component of the standard library (STL) of the C ++ programming language that is used for input / output operations. Its name is an acronym for Input / Output Stream. std = standar By including the sentence using namespace std we are telling the compiler that we will use the std namespace so we do not have to include it when we use elements of this namespace, such as the cout and cin objects (output and data entry): with using namespace std; cout << "Hello"; without using namespace std; std::cout << "Hello"; cout is standar output stream cout << "Hello"; on screen is printed "Hello" return is not a necessary thing in main function. Its only used if you start your body with int main(). Then you have to write return 0; at the end. If you use void main (doesn't return any value), then you do not have to call return. The main use of u is that as you see no parameter is passed in paranthesis of main() so it is just an instruction not to give any value as output by the main function, so we write it as return 0; All this is in the C++ course of SoloLearn
14th May 2018, 3:43 AM
David Escalante
David Escalante - avatar
+ 1
hi, iostream is a input/ output variation of classes , required to validate the input / output streams from the compiler. it is a type of header file used in ' C++' to define the input or output conditions from user . ( example :- cin - to pass character input stream from the user . cout- to pass character output stream to the screen. ) kindly refer to :- https://en.m.wikipedia.org/wiki/Input/output_(C%2B%2B) 2) namespace:- it is a standard definition to the compiler to show , a package of subclass within the main class. ( example:- namespace std ) kindly refer to:- https://en.m.wikipedia.org/wiki/Namespace 3) std :- is used to define the standard libraries within the c program. ie;. the programming main class has the standard derivatives from the compiler. 4) cout:- is a standard output stream from the compiler to the screen . cout is used in C++ printf was used in C 5) return 0:- this shows that the function when terminated is true , when proper execution is performed, the compiler sends a boolean value to the compiler to show that the function has terminated correctly. so after ( return 0) 1) the function can return to its original state. else 2) if declared, the function will try to continue to its sub classes.
14th May 2018, 9:50 AM
Rajeeb