C++
Part of the Fundamentals section of Coddy's C++ journey — lesson 1 of 74.
C++ is a powerful, high-performance programming language used in everything from game development and operating systems to scientific computing, known for its efficiency and flexibility.
Here is what the starter code does:
#include <iostream> — loads the library that lets you print text to the screen.int main() { ... } — this is the main function, where every C++ program starts running.cout << "Hello, World!"; — prints the text Hello, World! to the screen.When you run the code, you will see Hello, World! appear in the output.
Challenge
BeginnerPress the run code button to run your first C++ program.
The code uses
When you run it, you should see:
The code uses
#include <iostream> to enable input/output, defines the main() function where the program starts, and prints a message to the screen using std::cout.When you run it, you should see:
Hello C++!Try it yourself
#include <iostream>
int main() {
std::cout << "Hello C++!";
return 0;
}All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsModulo OperatorIncrement/DecrementPost Increment/DecrementArithmetic ShortcutsComparison OperatorsString Comparison3Variables Part 2
Type DeclarationNaming ConventionsRecap - Initialize VariablesType Casting Part 1Type Casting Part 26Decision Making
If StatementIf - ElseSwitch StatementConditional OperatorRecap - If ElseNested If - Else