Warning: Undefined array key 0 in /var/www/tgoop/function.php on line 65

Warning: Trying to access array offset on value of type null in /var/www/tgoop/function.php on line 65
24 - Telegram Web
Telegram Web
Channel created
C++ PDF's
What is C++?

πŸ“Œ C++ is a cross-platform language that can be used to create high-performance applications.

πŸ“Œ C++ was developed by Bjarne Stroustrup, as an extension to the C language.

πŸ“Œ C++ gives programmers a high level of control over system resources and memory.

@c_programming_tut
Why Use C++

πŸ“ŒC++ is one of the world's most popular programming languages.

πŸ“ŒC++ can be found in today's operating systems, Graphical User Interfaces, and embedded systems.

πŸ“ŒC++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs.

πŸ“ŒC++ is portable and can be used to develop applications that can be adapted to multiple platforms.

πŸ“ŒC++ is fun and easy to learn!

@c_programming_tut
πŸ“ŒC++ Getting Started...

βš™οΈ To start using C++, you need two things:

πŸ”§A text editor,
like Notepad,
Sublime Text ,
VS code,
to write C++ code

πŸ”§A compiler,
like GCC,
to translate the C++ code into a language that the computer will understand

@c_programming_tut
πŸ“ŒC++ Install IDE

βš™οΈAn IDE (Integrated Development Environment) is used to edit AND compile the code.

βš™οΈPopular IDE's include
Code::Blocks,
Eclipse, and
Visual Studio.
These are all free, and they can be used to both edit and debug C++ code.


Note: Web-based IDE's can work as well, but functionality is limited.

βš™οΈWe will use Code::Blocks in our tutorial, which we believe is a good place to start.

πŸ“₯ You can find the latest version of Codeblocks at
http://www.codeblocks.org/downloads/26
Download the mingw-setup.exe file, which will install the text editor with a compiler.


@c_programming_tut
πŸ“ŒC++ Quickstart

β˜‘οΈ Let's create our first C++ file.

β˜‘οΈ Open Codeblocks and go to File > New > Empty File.

β˜‘οΈ Write the following C++ code and save the file as myfirstprogram.cpp (File > Save File as):

@c_programming_tut
πŸ”– Don't worry if you don't understand the code above -
we will discuss it in detail in later chapters.

β˜‘οΈFor now, focus on how to run the code.

β˜‘οΈ Then, go to Build > Build and Run to run (execute) the program.

@c_programming_tut
πŸ‘‡πŸ‘‡ with Compiler🧲
πŸ“Œ Example explained

β˜‘οΈ Line 1: #include <iostream> is a header file library that lets us work with input and output objects, such as cout (used in line 5). Header files add functionality to C++ programs.

β˜‘οΈ Line 2: using namespace std means that we can use names for objects and variables from the standard library.

πŸ”–Don't worry if you don't understand how #include <iostream> and using namespace std works. Just think of it as something that (almost) always appears in your program.

@c_programming_tut
β˜‘οΈ Line 3: A blank line. C++ ignores white space.

β˜‘οΈ Line 4: Another thing that always appear in a C++ program, is int main(). This is called a function. Any code inside its curly brackets {} will be executed.

β˜‘οΈ Line 5: cout (pronounced "see-out") is an object used together with the insertion operator (<<) to output/print text. In our example it will output "Hello World".

β˜‘οΈLine 6: return 0 ends the main function.

β˜‘οΈLine 7: Do not forget to add the closing curly bracket } to actually end the main function.

@c_programming_tut
2025/07/05 06:04:33
Back to Top
HTML Embed Code: