A C++ program's skeleton looks similar to C's, but swaps stdio.h/printf for iostream/std::cout.
#include <iostream> // brings in std::cout, std::cin, etc.
using namespace std; // lets you write cout instead of std::cout
int main() {
int age = 20;
cout << "Age: " << age << endl;
return 0;
}
#include <iostream> pulls in the standard input/output stream library. Nearly everything in the C++ standard library lives inside the std namespace, which is why names are properly written std::cout, std::string, std::vector, and so on; using namespace std; imports all of std so you can drop the prefix, which is convenient for small programs and examples but discouraged in headers and large codebases, since it can cause naming collisions as a project grows.
int main() is still the required entry point (return 0; is optional in main specifically — the compiler assumes it if omitted, though writing it explicitly is still good practice). Everything else — semicolons, blocks with {}, statement-by-statement execution — works exactly as it does in C, since C++ was designed to remain almost entirely backward-compatible with C syntax.