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.

Slides:



Advertisements
Similar presentations
Outline zHistory zWhat is C++ zHow does C++ relate to other OO languages zTypes of applications for C++ zComponents of MSs Visual C zAdvantages /
Advertisements

C++ Introduction.
Introduction to Programming in C++ John Galletly.
Introduction to C++ Programming. A Simple Program: Print a Line of Text // My First C++ Program #include int main( ) { cout
Introduction to C++ September 12, Today’s Agenda Quick Review Check your programs from yesterday Another Simple Program: Adding Two Numbers Rules.
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to C++ Programming Outline History of C and C++ C++ Standard Library Object Technology Basics.
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
Three types of computer languages
Tuesday, December 05, 2006 I hear and I forget, I see and I remember, I do and I understand -Chinese Proverb.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
C programming Language and Data Structure For DIT Students.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program –comment.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
Chapter 3 Getting Started with C++
Hello World 2 What does all that mean?.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Instructor: Tina Tian. About me Office: RLC 203A Office Hours: Wednesday 1:30 - 4:30 PM or .
History of C and C++ C++ evolved from C ANSI C C++ “spruces up” C
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
Introduction to C++ Programming Language
Rossella Lau Lecture 1, DCO10105, Semester B, DCO10105 Object-Oriented Programming and Design  Lecture 1: Introduction What this course is about:
 2008 Pearson Education, Inc. All rights reserved. 1 CISC 1600 – Computer Science I Fall 2010 Introduction to C++ Programming Chapters 1 and 2 (Deitel.
Week 1 Algorithmization and Programming Languages.
Programming Fundamentals. Today’s Lecture Why do we need Object Oriented Language C++ and C Basics of a typical C++ Environment Basic Program Construction.
COMPUTER PROGRAMMING. A Typical C++ Environment Phases of C++ Programs: 1- Edit 2- Preprocess 3- Compile 4- Link 5- Load 6- Execute Loader Primary Memory.
CHAPTER 2 PART #1 C++ PROGRAM STRUCTURE 1 st semester H 1 King Saud University College of Applied studies and Community Service Csc 1101 By:
1 Programming in C Hello World! Soon I will control the world! Soon I will control the world!
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
Chapter 0 Getting Started. Objectives Understand the basic structure of a C++ program including: – Comments – Preprocessor instructions – Main function.
Basic Program Construction
Chapter 2 part #1 C++ Program Structure
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 05, 2005 Lecture Number: 4.
1 8/31/05CS150 Introduction to Computer Science 1 Hello World!
Course Title Object Oriented Programming with C++ instructor ADEEL ANJUM Chapter No: 03 Conditional statement 1 BY ADEEL ANJUM (MSc-cs, CCNA,WEB DEVELOPER)
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
MAHENDRAN. Session Objectives Session Objectives  Discuss the Origin of C  Features of C  Characteristics of C  Current Uses of C  “C” Programming.
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. Chapter 2 C++ Basics.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
CSCE 3110 Data Structures & Algorithms C++ warm-up.
Chapter 1 slides1 What is C? A high-level language that is extremely useful for engineering computations. A computer language that has endured for almost.
STRUCTURED PROGRAMMING Complete C++ Program. Content 2  Main Function  Preprocessor directives  User comments  Escape characters  cout statement.
Chapter 15 - C++ As A "Better C"
Foundations of Computer Science C & C++ programming lecture 2
C++ Programming: Presentation 1
Topic Pre-processor cout To output a message.
CMPT 201.
Computer Terms Review from what language did C++ originate?
CHAPTER 2 PART #1 C++ PROGRAM STRUCTURE
Introduction to C Language
Computing Fundamentals
Chapter 2 part #1 C++ Program Structure
Instructor: Chien-Ho Ko
Beginning C++ Programming
' C ' PROGRAMMING SRM-MCA.
Hello World 2 What does all that mean?.
Programming 1 (CS112) Dr. Mohamed Mostafa Zayed 1.
Chapter 1 – Introduction to Computers and C++ Programming
C programming Language
Computer Terms Review from what language did C++ originate?
Introduction to Programming - 1
Chapter 2 part #1 C++ Program Structure
Presentation transcript:

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

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

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

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

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

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 ( , files, etc)  Integrate components w/ other languages

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

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

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)

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

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++,

// 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.

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

#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.

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.

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.

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