what is c++, features, ides telerik software academy academy.telerik.com learning and development
Post on 03-Jan-2016
217 views
TRANSCRIPT
![Page 1: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/1.jpg)
Introduction to C++What is C++, Features, IDEs
Telerik Software Academy
Telerik Software Academyacademy.telerik.com
Learning and Development
![Page 2: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/2.jpg)
Table of Contents What is C++?
History, Concepts & Philosophy, Standards
C++ Basic Program Structure Entry point, libraries, namespaces
etc.
C++ Compilers & IDEs Code::Blocks
Visual Studio
C++ Features C libs, OOP, Templates, Exceptions,
Overloads
2
![Page 3: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/3.jpg)
What is C++Fast, Mid-level, Multi-paradigm
Language
![Page 4: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/4.jpg)
What is C++? (1) General purpose programming language Any field of application – science,
business, etc.
Compiles to binary Code directly executed on the
hardware
Statically typed All data is in predefined forms (data
types)
Data is represented in variables of data types
A variable is of only 1 data type through its lifespan
4
![Page 5: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/5.jpg)
What is C++? (2) Multi-paradigm
Supports procedural programming (as in C)
Supports object-oriented programming
Some functional programming in C++11 (latest)
Created by Bjarne Stroustrup Originally "C with Classes", later
renamed
Built over pure C, not fully compatible though
5
![Page 6: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/6.jpg)
C++ Programming Model (1)
Imperative, Multi-paradigm language
Programmer can mix and match Low-level memory access (down to
each byte)
Procedural code (functions, memory pointers, etc.)
Object-oriented code (classes, methods, objects, etc.)
6
![Page 7: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/7.jpg)
C++ Philosophy Features immediately useful in the real world
Programmers free to pick their own style
Allowing useful features More important than preventing
misuse
Features you do not use you do not pay for
Programmer can specify undefined behavior
More: en.wikipedia.org/wiki/C++#Philosophy
7
![Page 8: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/8.jpg)
C++ Standards C++ 98 – first standardized C++ version Still massively used today
C++ 03 – minor revision of 98, bug-fixes
C++ TR1 – specification of extensions to be included in next C++ version Not really a standard
C++ 11 – latest official revision Many new features and
improvements
Lambdas, range-based loops, etc.
8
![Page 9: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/9.jpg)
C++ Program StructureEntry point, Including libraries,
Termination
![Page 10: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/10.jpg)
C++ Program Structure Program entry point
C++ is free form – any ordering of program components is acceptable
C++ needs specific function to start from
The main function – entry point of the program No other function can be named
"main" Can receive command line
parameters Termination – main returns, the program stops The return value of main is the "exit
code“ 0 means no errors – informative, not
obligatory
10
![Page 11: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/11.jpg)
11
Hello World – Example This is a classical "Hello World"
example in C++:#include <iostream>using namespace std;
int main(int argc, char * argv[]){ cout<<"Hello World!"<<endl;
return 0;}
![Page 12: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/12.jpg)
12
Hello World – Example
#include <iostream>
using namespace std;
int main(int argc, char * argv[]){ cout<<"Hello World!"<<endl;
return 0;}
Include the input-output
library
Say we’re working with
std namespace (so we
don’t write std:: in
front of everything)
"main" function – our entry point
Parameters in
these brackets
are optional
Print to the console
For “main” 0 means everything went ok, terminating normally
![Page 13: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/13.jpg)
C++ Hello WorldLive Demo
![Page 14: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/14.jpg)
C++ IDEs and CompilersCompiling code, Integrated
Develompent Environments
![Page 15: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/15.jpg)
C++ Compilers A C++ compiler turns C++ code to assembly i.e. translates C++ to machine
language An IDE is software assisting programming Has a Compiler, Linker, Debugger,
Code Editor Code organization, Tools,
Diagnostics There are lots of C++ compilers
Free, open-source, proprietary Most are embedded in IDEs Bjarne Stroustrup’s advice on
picking an IDE and compiler: stroustrup.com/compilers.html
15
![Page 16: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/16.jpg)
C++ IDEs – Code::Blocks
Code::Blocks – free C & C++ IDE Used in International Olympiad in
Informatics
Comes with MinGW GCC compiler Currently no support for C++ 11
Lightweight Can compile single .cpp file
Can be used for bigger projects with many files, references, etc.
16
![Page 17: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/17.jpg)
Code::BlocksLive Demo
![Page 18: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/18.jpg)
C++ IDEs – Visual Studio
Visual Studio – proprietary IDE for MS stack
Supports latest C++ standards
Single tool for:
Writing code in many languages (C#, C++, …)
Using different technologies (Web, WPF, …)
For different platforms (.NET CF, Silverlight, …)
Full integration of most development activities (coding, compiling, testing, debugging, deployment, version control, ...)
18
![Page 19: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/19.jpg)
Visual StudioLive Demo
![Page 20: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/20.jpg)
C++ FeaturesNotable C++ Features, Supported in all
Standards
![Page 21: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/21.jpg)
C++ Features Operators and operator overloading
Over 35 operators – arithmetic, bitwise, comparisons, logical, etc.
User types can redefine operators
Memory management
Static allocation (compile-time, stack)
Auto allocation (stack)
Dynamic allocation – new, delete (heap)
21
![Page 22: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/22.jpg)
C++ Features Classes & Objects
Support for all OOP principles (inheritance, polymorpism, encapsulation, abstraction, virtuals)
Templates
Support for generic programming
22
![Page 23: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/23.jpg)
C++ Features Standard library
Set of libraries, data structures and algorithms
Largely based on the STL
Exceptions Objects representing errors
Can interrupt control flow and propagate to handlers
Can be user-created23
![Page 24: What is C++, Features, IDEs Telerik Software Academy academy.telerik.com Learning and Development](https://reader030.vdocuments.us/reader030/viewer/2022032414/56649ef35503460f94c057f4/html5/thumbnails/24.jpg)
форум програмиране, форум уеб дизайнкурсове и уроци по програмиране, уеб дизайн – безплатно
програмиране за деца – безплатни курсове и уроцибезплатен SEO курс - оптимизация за търсачки
уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop
уроци по програмиране и уеб дизайн за ученициASP.NET MVC курс – HTML, SQL, C#, .NET, ASP.NET MVC
безплатен курс "Разработка на софтуер в cloud среда"
BG Coder - онлайн състезателна система - online judge
курсове и уроци по програмиране, книги – безплатно от Наков
безплатен курс "Качествен програмен код"
алго академия – състезателно програмиране, състезания
ASP.NET курс - уеб програмиране, бази данни, C#, .NET, ASP.NETкурсове и уроци по програмиране – Телерик академия
курс мобилни приложения с iPhone, Android, WP7, PhoneGap
free C# book, безплатна книга C#, книга Java, книга C#Дончо Минков - сайт за програмиранеНиколай Костов - блог за програмиранеC# курс, програмиране, безплатно
?
? ? ??
?? ?
?
?
?
??
?
?
? ?
Questions?
?
Introduction to C++
http://academy.telerik.com