c++ print string
std::cout << "";
c++ print variable
cout << x;
cout << "X is: " << x << endl;
//endl is to end the line
c++ input from terminal when program is called
#include <iostream>
#include <string>
int main( int argc, char* argv[] )
{
std::string my_arg;
// First argument is always the name of your program
std::cout << argv[0] << std::endl;
if( argc == 2 )
{
// Something has been passed in
my_arg = argv[1];
std::cout << "Argument passed in is " << my_arg << std::endl;
}
return 0;
}
c++ cout int
#include <iostream>
std::cout << "Hello, World!" << std::endl;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us