Getting Started Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 29 September 2004 Chapter 1
History of C++ WWII Artillery trajectory Machine language Assembly language ADD, MOV High-level language: BASIC, COBAL Compiler Linker Advantages Easy to develop distributable Well-written and easy-to-maintain > computer cost
Terminology Program Source code Executable file Structural (procedural) language Split and conquer Data-driven Lack of reusability Object-oriented language Treat data and the procedures that act upon the data as a single “object” Four pillars Encapsulation Encapsulation Data hiding Inheritance polymorphism polymorphism
How C++ enovled CCCC C++ Bjarne Stroustrup ANSI No need to learn C first!
NCKU Microsoft CA 3.0
Example 1 #include #include #include<conio.h> using namespace std; int main() { cout << "Hello World!\n"; getch(); return 0; }