This presentation is the property of its rightful owner.
Sponsored Links
1 / 48

面向对象程序设计 PowerPoint PPT Presentation


  • 151 Views
  • Uploaded on
  • Presentation posted in: General

面向对象程序设计. 山东师范大学信息科学与工程 刘弘. 第一章 C++ 语言概述. 1.1 面向对象程序设计基本概念 1.2 C++ 语言是一种面向对象的程序设计语言 1.3 C++ 程序结构的特点 1.4 Visual C++ 6.0 简介. 1.1 面向对象程序设计基本概念. C++ 发展史

Download Presentation

面向对象程序设计

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


4388990


4388990

C++

1.1

1.2 C++

1.3 C++

1.4 Visual C++ 6.0


4388990

1.1

  • C++

    C++CCC1969~1973UNIXCBBKen ThompsonBCPLUNIXBCPLMartin Richards60MIT


4388990

C++

1971Dennis RitchieBNBNew BBBRitchieC1983CANSI1989CANSI CBjarne StroustrupCC++UNIXC++CC++ISO19971119988


4388990

  • FORTRAN

  • ALGOL

  • SIMULA 67

  • ADA

  • SMALLTALK


4388990

  • 2060Simula 67Algol 60

  • 2070AdaAda


4388990

  • SmalltalkSimula


4388990

Smalltalk


4388990

C++CC++


4388990

C++C++


4388990

intdouble


4388990


4388990


4388990


4388990

Cclass""


4388990

ABAB1MyBicycle2changeSpeed3HigherSpeed


4388990

()

12


4388990


4388990

()


4388990

()

""""


1 2 c

1.2 C++

C++VCC++C++


4388990

C++

1C++C++CCC++C++


4388990

2C++

C++(Private)(Public)(Protected)


4388990

3C++

C++


4388990

4C++

()C++


4388990

5C++

C++C++


4388990

6C++

C++


4388990

7C++

C++


4388990

C++C

1. C++C

2. C++C

3. C++C


4388990

C++C

  • C++C1C/*Explanation Sentence*/C//Explanation Sentence"//"


4388990

2

CC++CC++for(int i = 1; i < = 100; i++);


4388990

3

C++CCC++fint f(char, double);C"f( )"


4388990

4

  • "+/"C++CC++


4388990

5

C++newdeleteCmalloc()free();


4388990

6/

CC//cout<<"C++ is beautiful!";aint a;cin>>a;/"<<>>"/


4388990

C++

1C++C++(a-zA-Z)(0-9)(#%^&*_<>?\,)


4388990

2

  • C++6

  • C++


4388990

#include <iostream.h>

void main()

{ double x,y;

cout<<"Enter two float numbers:";

cin>>x>>y;

double z=x+y;

cout<<"x+y="<<z<<endl;

}


4388990

C++

  • C++1C++#include <iostream.h>2C++

    cout<<Enter two float numbers:

    cin>>x>>y;

    cout<<x+y=<<z<<endl;


4388990

3C++C++main()4C++


4388990

5

65C++C++

#define PI 3.14159


4388990

C++

C++(\)


4388990

C++

C++C++C++C++()


4388990

C++

Visual C++6C++PCC++


4388990

C++.cppSource Code.objObjective CodeExecutable Code.exe.exe


4388990

  • Visual C++ 6.0,

    File->New>File->C++ Source File

  • C++

  • Build->Compile ****.cpp

  • Build->Execute ***.exe(Ctrl-F5,


4388990

  • .C++*.cpp.

    2.

    File->New>Project->Win32 Console Application

    3.

    Project->Add File to Project->Insert File into Project

    4.Build->Build All

    5.


4388990

#include <iostream.h>

int add(int,int);

void main()

{ int a,b;

a=5;

b=7;

int c=add(a,b);

cout<<"a+b="<<c<<endl;

}

int add(int x,int y)

{

return x+y;

}


  • Login