{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

01 - C Language Programming Teaching Material n J y T v c...

Info iconThis preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
C++ Language Programming
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Teaching Material +°° Introduction to Programming with C++ n°° Y.Daniel Liang ¨ y ± J°° —, ] 2009 n 6 n° 1 T c v · J T c v · www.cs.armstrong.edu/liang/cpp T c v · ² ³ ´ °
Background image of page 2
Reference + 1 n C++ ² ³ ´ “0°° p ( ¸ª* 21 n°° µ0 ± “0°° 9 ]E n 2 n C++ Primer n°° ( n 4 n ) n Stanley B. Lippman Barbara E. Moo Josée LaJoie } av · n°° n 3 n°° C++/C °°°° °° http://download.csdn.net/source/374232
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Syllabus Part I Fundamentals of Programming Chapter 1 ~ Chapter 8 (6 credit hours) Part II Object-Oriented Programming Chapter 9 ~ Chapter 14 (14 ~ 16 credit hours) Part III Data Structures Chapter 15 ~ Chapter 20 (4 credit hours) Part IV C++ development Extension of teaching material. Development of simple GUI applications using MFC. (2 ~ 4 credit hours)
Background image of page 4
Grading Class Participation ( +°°° ): 20% Home Works ( +°° ° ): 10% Final Examination ( +°°° ): 70%
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Chapter 1 Fundamentals of Programming
Background image of page 6
Objectives To review computer basics, programs, and operating systems (§1.2-1.4). (Optional) To represent numbers in binary, decimal, and hexadecimal (§1.5 Optional). To know the history of C++ (§1.6). To write a simple C++ program (§1.7). To understand the C++ program development cycle (§1.8). To develop C++ using Visual C++ (§1.9).
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Before Writing Your First C++ Program Question: Where to write your C++ program?
Background image of page 8
Before Writing Your First C++ Program Question: Where to write your C++ program? A typical C++ program usually includes two types of text files: *.cpp file (source file, definition file) *.h file (header file) You can write your program in any text editor , then name it properly.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Let’s Write a Simple C++ Program #include <iostream> int main() { // Display Welcome to C++ to the console std::cout << "Welcome to C++!" << std::endl; getchar(); return 0; }
Background image of page 10
After Writing the C++ Program Compiler Welcome.cpp Welcome.obj Compiling… Send it to the compiler Now it is the compiler’s job Waiting … See what we’ll get
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Then? Linker Welcome.obj Welcome.exe Linking… Send it to the linker Now it is the linker’s job Waiting … See what we’ll get
Background image of page 12
Now run your program Is the result what you want?
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Review What We Have Done
Background image of page 14
Source Code Create/Modify Source Code Compiler Executable Code Run Executable Code e.g., Welcome Result If compilation errors If runtime errors or incorrect result #include <iostream> int main() { // Display Welcome to C++ to the console std::cout << "Welcome to C++!" << std::endl; return 0; } Saved on the disk stored on the disk Source code (developed by the programmer) Machine Code program Linker stored on the disk An object file (e.g., Welcome.obj) is created. An executable file (e.g., Welcome.exe) is created.
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Think it tedious? IDE ( Integrated Development Environment ) makes things much easier.
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}