Step 1 of 6
Hello, C++
C++ grew out of C, so almost all your C knowledge carries over. The first visible difference is output. Instead of printf, C++ uses streams:
#include <iostream>
int main() {
std::cout << "Kills: " << 25 << "\n";
}
std::coutis the standard output stream.<<sends things into it, left to right. No format specifiers needed: it knows the types.std::means these names live in the standard namespace.- In C++,
mainmay skipreturn 0;(it's implied).
Your turn: print Rounds won: 13 using cout.