0% found this document useful (0 votes)
86 views2 pages

C++ Programming

To compile and run a C++ program: 1. Save your code in a .cpp file 2. Compile the file using g++ and output to an executable file 3. Run the executable file to output "Hello, world!" C++ is a general purpose programming language that improves on C by adding support for data abstraction, object-oriented programming, and generic programming while still being suitable for systems programming.

Uploaded by

Far Iz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views2 pages

C++ Programming

To compile and run a C++ program: 1. Save your code in a .cpp file 2. Compile the file using g++ and output to an executable file 3. Run the executable file to output "Hello, world!" C++ is a general purpose programming language that improves on C by adding support for data abstraction, object-oriented programming, and generic programming while still being suitable for systems programming.

Uploaded by

Far Iz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

How to a. Compilation process. b. Execute the program. a. For a C++ program: johndoe on ce.uml.edu>gcc -o assignment1 assignment1.c You program will be compiled into a executable file called "assignment1". As in the case of "a.out" you may run this by simply typing in "assignment1" at the prompt as follows. johndoe on ce.uml.edu>assignment1 b. First, create a file (I'll call mine hello.cpp) Code: #include <iostream>

c. d. e. f. g. h. i.

int main() { std::cout << "Hello, world!" << std::endl; }

Then compile with Code: g++ hello.cpp -o hello

j. k. l.

Run the executable with Code: ./hello

m. n.

2. What is C++ Programming C++ is a general purpose programming language with a bias towards systems programming that is a better C, supports data abstraction,supports objectoriented programming, and supports generic programming.

You might also like