You are on page 1of 10

COMPUTER PROGRAMMING 2

Programming Using C++


PRESENTED BY:
Jhaun Paul G. Enriquez
SHS ICT Faculty
1
LEARNING OUTCOMES:

1. Discuss the features of C++ Programming Language.


2. List down its advantages and disadvantages.
3. Describe the C++ Basic Program Structure.
4. Create a basic program using C++.

COMPUTER PRORAMMING 2 2
WHAT IS C++?
• A cross-platform language that can be used to create high-
performance applications.
• Developed by Bjarne Stroustrup (1979), as an extension to the
C language.
• Gives programmers a high level of control over system
resources and memory.

Source: https://www.w3schools.com/cpp/cpp_intro.asp

COMPUTER PROGRAMMING 2 3
WHAT IS C++?
• Statically typed, compiled, general-purpose, case-sensitive,
free-form programming language that supports procedural,
object-oriented and generic programming
• An intermediate level language that encapsulates both high- &
low-level language features
• One of the most popular languages primarily with software,
drivers, client-server applications and embedded firmware
• A platform dependent language to execute the program
Source: Pomperada, Jake. 2019. Beginner’s Guide to C++ Programming. Manila: Mindshapers Co., Inc.

COMPUTER PROGRAMMING 2 4
Features of C++
• Simple • Object-oriented
• Portability • Case-sensitive
• Powerful • Syntax-based language
• Platform dependent • Use of Pointers

Source: Pomperada, Jake. 2019. Beginner’s Guide to C++ Programming. Manila: Mindshapers Co., Inc.

COMPUTER PROGRAMMING 2 5
Getting Started with C++:
• A text editor, like Notepad or DevC++, to write C++ code
• A compiler, like GCC, to translate the C++ code into a language
that the computer will understand

Source: Pomperada, Jake. 2019. Beginner’s Guide to C++ Programming. Manila: Mindshapers Co., Inc.

COMPUTER PROGRAMMING 2 6
What is an IDE?
• stands for Integrated Development Environment
• enables programmers to consolidate the different aspects of writing a
computer program
• increase programmer productivity by combining common activities of
writing software into a single application: editing source code, building
executables, and debugging.
• Able to give visual cues on the language using syntax highlighting

without syntax highlighting in notedpad with syntax highlighting using DevC++


COMPUTER PROGRAMMING 2 7
Source: https://www.codecademy.com/articles/what-is-an-ide
C++ Basic Program Structure
• #include <iostream> is a header file
library that lets us work with input and
output objects. Header files add
functionality to C++ programs.
• using namespace std means that we can
use names for objects and variables
from the standard library.
• int main() a function that is the starting point
Note: The compiler ignores white of the program execution.
spaces. However, multiple lines makes • cout is an object used together with the
the code more readable. insertion operator (<<) to output/print text
- Use // for inserting comments • return 0 ends the main function
- Use endl to insert new line
Source: Pomperada, Jake. 2019. Beginner’s Guide to C++ Programming. Manila: Mindshapers Co., Inc.

COMPUTER PROGRAMMING 2 8
COMPUTER PRORAMMING 2 9
COMPUTER PRORAMMING 2

You might also like