Learn how to write C++ source code by exploring the syntax of this language. It might help to think of syntax as the spelling and grammar of a programming language. Ā
- [Narrator] This video reviews the C++ syntax.…I find it helpful to think of syntax…as the grammar of a programming language.…For example, what is the symbol…that you would use at the end…of a sentence in English?…Chances are you're going to say the period.…Well, in C++ we have something similar.…At the end of every C++ statement…we end that statement…with instead of a period, a semicolon.…It is important to note that the period,…or the dot symbol, is used for other purposes in C++,…so we use the semicolon at the end of each statement.…
Here are some of the symbols that you'll see in C++ syntax.…The pound sign, which is sometimes referred to…as the hash mark.…The less than and greater than symbols,…but when they're used together like that,…or if they have a word between them,…they actually have a different meaning,…and they actually enclose a directive,…and we'll talk more about that.…Followed by, open curly bracket and close curly bracket.…Then we have the square brackets.…Next we have the scope resolution operator.…
Author
Released
4/24/2017- Compiling and running C++ programs
- Creating variables in C++
- Choosing the correct data type to represent variables
- Creating assignment expressions
- Changing data types in C++
- Comparing values in C++
- Using logical operators
- Comparing strings in C++
- Defining and calling a function
- Using arrays in C++
Skill Level Beginner
Duration
Views
Related Courses
-
Java: IDE Overview
with Peggy Fisher3h 17m Beginner -
Women in STEM
with Peggy Fisher13m 27s Appropriate for all -
Learning C++
with Peggy Fisher2h 36m Beginner
-
Introduction
-
Welcome1m
-
-
1. C++ Basics
-
C++ syntax4m 28s
-
What is #include in C++?4m 34s
-
C++ data types6m 42s
-
Solution: Calculate interest4m 29s
-
2. How to Work with Data in C++
-
What is variable scope?7m 49s
-
How to format output in C++5m 43s
-
Challenge: Real estate1m 44s
-
Solution: Real estate7m 24s
-
3. Decision Statements in C++
-
4. Program Flow Control in C++
-
Syntax for a while loop7m 14s
-
When to use a do while loop4m 40s
-
How to write a for loop4m 14s
-
Challenge: Loop46s
-
Solution: Loop9m 19s
-
-
5. What Are Functions in C++?
-
Passing data to a function7m 19s
-
Solution: Calculate area7m 10s
-
6. How to Use Arrays in C++
-
Arrays as function arguments4m 11s
-
Conclusion
-
Next steps32s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: C++ syntax