Chapter 2: Introduction To C++ PDF
Document Details

Uploaded by BullishMint3770
Suez Canal University
2012
Tags
Related
- Introduction to C++ Programming (1).pdf
- 22316 Object-Oriented Programming using C++ Sample Question Paper PDF
- Lecture 1: Introduction to C++ Programming and Computer Science PDF
- Computer Programming - C++ Lecture Notes PDF
- Chapter 3: Introduction to C++ Programming PDF
- BSc Computer Science Past Paper PDF
Summary
This document introduces C++ programming concepts, including elements like comments, preprocessor directives, and output statements. This is a chapter from a computer science textbook, focusing on introductory C++ concepts.
Full Transcript
Chapter 2: Introduction to C++ Copyright © 2012 Pearson Education, Inc. C++ Program Parts Copyright © 2012 Pearson Education, Inc. The Parts of a C++ Program // sample C++ program comment #include preprocessor directive...
Chapter 2: Introduction to C++ Copyright © 2012 Pearson Education, Inc. C++ Program Parts Copyright © 2012 Pearson Education, Inc. The Parts of a C++ Program // sample C++ program comment #include preprocessor directive using namespace std; which namespace to use int main() beginning of function named main { beginning of block for main cout Open/close brackets Enclose filename in #include ( ) Open/close Used when naming a parentheses function { } Open/close brace Encloses a group of statements " " Open/close Encloses string of quotation marks characters ; Semicolon End of a programming statement Copyright © 2012 Pearson Education, Inc. The cout Object Displays output on the computer screen You use the stream insertion operator