Загрузка...

The Descent: Your First Two C++ Programs: hello.cpp and vector_demo.cpp | Floor 0 Video 3

In this video, we write, build, and run your first two C++ programs by hand: hello.cpp and vector_demo.cpp.

We start with the basic shape of every C++ file, including #include, int main(), std::cout, variables, strings, and return 0. Then we move into a small dungeon-themed example using std::vector, struct Monster, push_back, indexing, and a range-based for loop with const auto&.

Along the way, I compare each C++ idea to something familiar from Python so the syntax feels less mysterious and the concepts become easier to connect.

In this video, you will learn:

How to write and run a basic C++ program
What #include, main, and return 0 do
How std::cout works
How C++ variables differ from Python variables
How to use std::vector
How to define a simple struct
How to loop through a vector with const auto&
How to compile with g++

Next up: we use growth.cpp to see the difference between linear and quadratic growth.

#Cplusplus #ComputerScience #Programming #DataStructures #Teaching #HigherEd #CodingEducation #ProfJoe #Algorithms

Видео The Descent: Your First Two C++ Programs: hello.cpp and vector_demo.cpp | Floor 0 Video 3 канала Dr. Joe
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять