Presentation is loading. Please wait.

Presentation is loading. Please wait.

Outline  History  What is C++  How does C++ relate to other OO languages  Types of applications for C++  Components of MS’s Visual C++ 6.0  Advantages.

Similar presentations


Presentation on theme: "Outline  History  What is C++  How does C++ relate to other OO languages  Types of applications for C++  Components of MS’s Visual C++ 6.0  Advantages."— Presentation transcript:

1 Outline  History  What is C++  How does C++ relate to other OO languages  Types of applications for C++  Components of MS’s Visual C++ 6.0  Advantages / Disadvantages of C++

2 History of C++  1972: C language developed at Bell Labs  Dennis Ritchie wrote C for Unix OS  Needed C for work with Unix  late 70s: C becomes popular for OS development by many vendors  Many variants of the language developed  ANSI standard C in 1987-89

3 History of C++ (continued)  early 80s: Bjarne Stroustrup adds OO features to C creating C++  90s: continued evolution of the language and its applications  preferred language for OS and low level programming  popular language for application development  low level control and high level power

4 Conceptually what is C++  Alternatives:  is it C, with lots more options and features?  is it an OO programming language with C as its core?  is it a development environment?  On most systems it is a development environment, language, and library, used for both procedural and object oriented programming, that can be customized and extended as desired

5 Versions of C++  ANSI C++  Microsoft C++ (MS Visual C++ 6.0)  Other vendors: Borland, Symantec, Turbo, …  Many older versions (almost annual) including different version of C too  Many vendor specific versions  Many platform specific versions

6 What you can do with C++  Apps (standalone, Web apps, components)  Active desktop (Dynamic HTML, incl Web)  Create new controls  Create apps with "look and feel" of IE4  ActiveX documents (charts, graphs, etc.)  Data access (e-mail, files, etc)  Integrate components w/ other languages

7 Microsoft’s C++  Development Environment  project mgmt, editor, debugging tools, user interface Visual Studio 6.0  Language (  compiler, linker, loader, etc.  Visual C++ 6.0  Libraries  std libraries, iostream, iomanip, stdio, time, string, math, etc.

8 Disadvantages of C++  Tends to be one of the less portable languages  Complicated!!!  40 operators, intricate precedence, pointers, etc.  can control everything  many exceptions and special cases  tremendous libraries both standard, vendor specific, and available for purchase, but all are intricate  Aspects above can result in high cost, maintenance and reliability problems

9 Advantages of C++  Available on most machines  Can get good performance  Can get small size  Can manage memory effectively  Can control everything  Good supply of programmers  Suitable for almost any type of program (from systems programs to applications)

10 Structure of a program // my first program in C++ #include using namespace std; int main () { cout << "Hello World!"; return 0; }

11 z// my first program in C++ z This is a comment line #include Lines beginning with a hash sign (#) are directives for the preprocessorThey are not regular code lines with expressions but indications for the compiler's preprocessor. In this case the directive #include tells the preprocessor to include the iostream standard file. This specific file (iostream) includes the declarations of the basic standard input-output library in C++,

12 // my first program in C++ This is a comment line // my first program in C++ This is a comment line using namespace std; All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std.

13 C++ program lec1 To begin learning C++ lets examine our first C++ program: #include void main() { cout <<“wellcome to c++ program”; }

14 #include All C++ programs must start with #include. The iostream.h header file must be include For any program that outputs data to the Screen or inputs data from the keyboard. We shall discuss other types of header files later in the coming chapter.

15 Main() Every C++ program has function called main { start of main. } end of main. You should write your program inside main. cout<< It’s passes the characters between quotes(“) To the screen.

16 zC++ provide escapes sequence for several usages. these escape are listed below: z\n new line. z\t horizontal tab [six space]. z\a alert sound. z\\ print a backslash character. z\” print a (“) character.

17 zكتابة // معناها انني اكتب ملاحظات z #includeمن اوامر لغة سي ++ ( المعالج المبدئي ) iostream.hملف او هدير فايل لتعريف الاوامر المستخدمة <> اقواس لوضع الملف المطلوب ضمه او تحميله بينهما


Download ppt "Outline  History  What is C++  How does C++ relate to other OO languages  Types of applications for C++  Components of MS’s Visual C++ 6.0  Advantages."

Similar presentations


Ads by Google