i have a question about using std in c++ programming,for instance using 'std::cout' , 'std::cin' or 'std::endl'
could you plz give me a definition for std and tell me the function of std in using of it in code?
As explained above, "The standard C++ library is a collection of functions, constants, classes, objects and templates that extends the C++ language providing basic functionality to perform several tasks, like classes to interact with the operating system, data containers, manipulators to operate with them and algorithms commonly needed."
cin and cout are used to input and print characters using a stream just like printf and scanf except you are using the operators << and >> to represent output and input respectively.
Here is an example of code using cin and cout:
std::cout<<"Enter your age: ";
std::cin.ignore(); //remove the terminating character
std::cout<<"You entered "<<age<<std::endl;