Project: Hello World
In this project we'll write our first program, the classic 'hello world' program. The 'hello world' actually comes from the original creators of the C programming language. It's a basic program that will teach us how to structure our program & compile it. It will also introduce the C runtime libraries & a very useful function printf.
By the end of this project you'll be able to:
- Write the entry point all programs require
- Use common commands in the command prompt
- Compile a program from the command line
- Run a program from the command line
- Learn about variables & what a string is
- Learn what the '#include' statement does
- Understand what printf does
- Print 'Hello World' to the command line
Lesson 0: Writing the entry point to our program
In this lesson we introduce the entry point to our program. We also learn about functions & what a function requires.
Lesson 1: Using the command line & creating our first c++ file
We use some common commands on the command line to navigate to different folders & make new folders. We learn create a new .cpp file ready to write our code.
Lesson 2: Compiling our program
We use the compiler to turn our code into a program, and then run it.
Lesson 2: Variables & Strings
We show what a variable is & introduce strings, and how in C code you intialize strings.
Lesson 3: #include statment & header (.h) files
We introduce the #include statment used to import header files (files ending in .h)
Lesson 4: the Printf function
We use the printf funciton to output our string to the console.