Download presentation
Presentation is loading. Please wait.
Published byGiles Watkins Modified over 9 years ago
1
C++ Introduction : C++ compilation
2
Visual Studio 2008 : Creating Command-Line Program
3
Visual Studio 2008 Creating Command-Line Program
7
C++ Introduction : C++ program structure
8
It is OK to use C code in C++ program
9
C++ Introduction : C++ Standard Input/Output
10
Standard Output (cout) cout : screen stream object
11
Standard Input (cin) cin : keyboard stream object
12
C++ Introduction : Functions
13
C++ Introduction : array/pointer/dynamic allocation Array/Pointer : almost same as C Dynamic allocation –malloc (in C) new (in C++) –free (in C) delete (in C++) Ex) in C int *x; x=(int*)malloc(10*sizeof(int)); … free(x); Ex) in C++ int *x; x=new int[10]; … delete[] x;
14
C++ Introduction : C++ class
15
class class : data structure type that can contain member data and member functions.
16
class constructor/destructor –member function that is automatically called when the object is created/deleted.
17
pointers to class object
18
C++ Introduction : Input/Output with Files
19
file stream class –ofstream: stream class to write on files –ifstream: stream class to read from files –fstream: stream class to reaad and write from/to files
20
File open mode
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.