Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tuesday, December 05, 2006 I hear and I forget, I see and I remember, I do and I understand -Chinese Proverb.

Similar presentations


Presentation on theme: "Tuesday, December 05, 2006 I hear and I forget, I see and I remember, I do and I understand -Chinese Proverb."— Presentation transcript:

1 Tuesday, December 05, 2006 I hear and I forget, I see and I remember, I do and I understand -Chinese Proverb

2 CS 192 / CMPE 191 §First course in programming using C++

3 §Course Outline §Course Website URL http://suraj.lums.edu.pk/~cs192w06/ l Information about the course, office hours, contact information, announcements, lecture- slides, tutorials, source code … §\\indus\Common\cs192w06 §Overview of C++ CS192 / CMPE 191 ‘Problem Solving and Computer Programming’

4 §Make use of office hours.

5 §Course builds on top of previous discussion. §Don’t hesitate to ask questions in class.

6 5 minute rule!

7 What is a program? -

8 §C++ programming language. High level language

9 §What does the computer understand?

10 §What do we need here?

11 #include int main() { cout<<“Hello\n”; } myprogram.c Type your C++ program into a text file It is human-readable myprogram.exe machine-readable

12 §Compiler §Source code §Object code

13 §What happens when you start a program?

14 C++ l What’s with the name?

15 §In 1970s l Developed by Dennis Ritchie of AT&T Bell Laboratories l It was first used for writing UNIX operating system §Widely used in programmer community §ANSI (American National Standards Institution) standard C (1983) Some history …

16 Advantages of C §Built-in power §Efficiency §Flexibility § Library routines

17 From C to C++ (1980 – Bell Labs) §Reason : Increasing complexity of programs §Bjarne Stroustrup of AT&T Bell Laboratories developed C++ in 1980s. §Most of C is a subset of C++

18 From C to C++ (1980 – Bell Labs) §High performance system software is constructed using C++ §C++: Enhancement to C

19 Real programmers language Also it is …

20 a lot ofFUN!

21 §Computer Science Fundamentals (CS 111) §Object Oriented Programming (CS 292) §Data Structures (CS 213) §Operating Systems (CS 381)

22 My assumptions Knowledge of l A text editor l Files l Some experience of using Windows operating system. l General knowledge of what computer hardware / software is.

23 §Basic C++ Program Structure. §Statements

24 §Input / Output (I/O)

25 §Compiler §Linker

26 #include int main( ) { cout <<"Welcome to CS192/CMPE191"; return 0; }

27 §Include directives

28 iostream is the name of library that contains definition of routines that handle input and output. iostream.h is a file that contains information about this library

29 Welcome to CS192/CMPE191

30 Comments have two forms in C++ //Single line comments /*Multi-line comments*/ /* comments ignored by compiler */ // comments required by some organizations!


Download ppt "Tuesday, December 05, 2006 I hear and I forget, I see and I remember, I do and I understand -Chinese Proverb."

Similar presentations


Ads by Google