Page MenuHomec4science

console_output.cpp
No OneTemporary

File Metadata

Created
Tue, Oct 1, 22:19

console_output.cpp

#include <iostream>
int main() {
std::cout << "Hello World!\n";
// Output multiple variables at the same time:
int x = 1, y = 2;
std::cout << "x = " << x << " and y = " << y << "\n";
// Output is buffered, to force output:
std::cout << "Hello World\n";
std::cout.flush();
}

Event Timeline