SlideShare a Scribd company logo
eleks.comeleks.com
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
• Вбудовані типи (char, int, double, float,
bool)
• Складні типи (Class, Struct, Union, Enum)
• Оголошення масиву
• Доступ до елементів масиву
• Виділення памяті на
стеку
• Виділення памяті на heap
• Оператори new, new[], delete, delete[]
• Що таке
вказівник
• Основні операції
з вказівником
• Поняття константності
• Константний вказівник
• Передача аргументів по значенню і за
посиланням (різниця між ними)
• Відмінність між стеком і хіпом
• Приклад, де стекова змінна видалена, а
хіпова – ні.
• Області видимості
C++ Basics
Вигляд класу в С++ ІДЕ, definition,
declaration
Конструювання/Видалення екземплярів
класу
Методи, поля класу
Паттерн для управління ресурсами
Конструктор захоплює, деструктор
звільняє
Важливо для об’єктів на стеку
bool read_data_with_file(const std::string &filename, ...) {
FILE *f = fopen(filename, ...);
if (f == NULL) {
return false;
}
int count;
if (!read_number_from_file(f, &count)) {
fclose(f); // ! need to close file on each error
return false;
}
// ... read more data, can also cause errors
fclose(f);
return true;
}
bool read_data_with_stream(const std::string &filename, ...) {
std::ifstream ifs(filename, ...);
if (!ifs.is_open()) {
return false;
}
int count;
if (!read_number_from_stream(ifs, &count)) {
// file will be automatically closed
return false;
}
// ... read more data
// file will be automatically closed
return true;
}
Конструювання/Видалення екземплярів
класу
Методи, поля класу
• Вбудовані типи (char, int, double, float etc)
• Складні типи (Class, Struct, Union, Enum)
C++ Basics
eleks.com

More Related Content

PPTX
Unit1 summary
PPTX
PPTX
Improving rpc bkp
PPTX
tsql
PPTX
Advanced styles
PPTX
Advanced C++ concepts
PPTX
SQL: Indexes, Select operator
PPTX
#2 integration + ui tests
Unit1 summary
Improving rpc bkp
tsql
Advanced styles
Advanced C++ concepts
SQL: Indexes, Select operator
#2 integration + ui tests

Viewers also liked (20)

PPTX
If unit2 summary
PPTX
#4 code quality
PPTX
Frontend basics
PPTX
PPTX
Code Practices
PPTX
Design patterns
PPTX
SQL Grouping, Joins
PPTX
Sql 04n edited
PPTX
.NET Platform. C# Basics
PPTX
Mvvw patterns
PPTX
Version control
PPTX
SDLC. PM Role
PPTX
Advanced c sharp part 3
PPTX
Web service lecture
PPTX
Windows service
PPTX
Data Structures
PPTX
SDLC. QA Role
PPTX
Css animation, html5 api
PPTX
Communication in android
PPTX
Angular. presentation
If unit2 summary
#4 code quality
Frontend basics
Code Practices
Design patterns
SQL Grouping, Joins
Sql 04n edited
.NET Platform. C# Basics
Mvvw patterns
Version control
SDLC. PM Role
Advanced c sharp part 3
Web service lecture
Windows service
Data Structures
SDLC. QA Role
Css animation, html5 api
Communication in android
Angular. presentation
Ad

Similar to C++ Basics (20)

PPT
01 Incapsulation
PPTX
Lecture 03 for distance courses "Fundamentals of Informatics"
PPTX
IT Talks The c++'s simplest smart pointers in depth
PPTX
тема 7
PPT
03 Constants And Variables
PDF
Знайомство з програмуванням на мові C++
PPT
Основи алгоритмізації та програмування. Лекція 1
PPT
06 Pointers To Class Members
PPTX
Net framework і c# module 16
PPTX
Net framework і c# lesson1
PPTX
Net framework і c# lesson1
PPT
07 Containers
PPT
07 Localisation
PPTX
Net framework і c# module 3
PPTX
Вказівники с++
PPT
UML Prezentation class diagram
PPT
Название презентации
PPT
Prezentation class diagram
PDF
Використання класу string для роботи з рядками в C++
01 Incapsulation
Lecture 03 for distance courses "Fundamentals of Informatics"
IT Talks The c++'s simplest smart pointers in depth
тема 7
03 Constants And Variables
Знайомство з програмуванням на мові C++
Основи алгоритмізації та програмування. Лекція 1
06 Pointers To Class Members
Net framework і c# module 16
Net framework і c# lesson1
Net framework і c# lesson1
07 Containers
07 Localisation
Net framework і c# module 3
Вказівники с++
UML Prezentation class diagram
Название презентации
Prezentation class diagram
Використання класу string для роботи з рядками в C++
Ad

More from eleksdev (12)

PPTX
Lecture android best practices
PPTX
Hello android world
PPTX
Android location and sensors API
PPTX
Lecture java basics
PPTX
G rpc lection1_theory_bkp2
PPTX
G rpc lection1
PPTX
Aspnet core
PPTX
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
PPTX
SDLC. UX Role
PPTX
SDLC. BA Role
PPTX
NoSQL basics
PPTX
sql introduction
Lecture android best practices
Hello android world
Android location and sensors API
Lecture java basics
G rpc lection1_theory_bkp2
G rpc lection1
Aspnet core
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
SDLC. UX Role
SDLC. BA Role
NoSQL basics
sql introduction

C++ Basics