您的位置:首页 > 编程语言 > C语言/C++

C++简介

2007-07-03 00:33 344 查看
C++是在C的基础上,增加面向对象的概念而来。
C++是C的超集,它包括C的全部属性和特征,并且添加了对面向对象的完全支持。

结构化程序设计
结构化程序设计把程序看作是一个处理数据的流程,按照业务逻辑对数据进行一系列的操作,然后得到想要得结果。
结构化设计的思想是功能分解和逐步求精。把一个复杂的任务分解成一系列较小的易于理解的功能部件。

面向对象程序设计
面向对象程序设计的特点:封装,继承和多态。

结构化程序设计的一般流程:
比如需要实现某个功能,该功能主要有3个主要的处理逻辑。
编码基本步骤如下:
1)
//to so some work
int main()
{
//step 1
//first todo some thing

//step 2
//then todo some thing

//step 3
//todo some thing at last
}

2)
明确步骤的函数名称和接口
//to so some work
int main()
{
//step 1
//first todo some thing
//int workstep1(int nDataResource)

//step 2
//then todo some thing
//int workstep2(some data from step1 or others)

//step 3
//todo some thing at last
//int workstep3(some data)
}

3)
实现函数体,并调试功能
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: