码迷,mamicode.com
首页 > 编程语言 > 详细

c++学习

时间:2015-03-13 22:08:35      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

//类成员函数的定义
#include <iostream> using namespace std; void show();//普通函数的声明 void show() //普通函数的定义 { cout<<"你好世界"; } class human { public: void set(int x); //类成员函数的声明 void set(int x) //类成员函数在类内部定义的情况 { cin>>x; } } void human::set(int x) //类成员函数的定义在类外面定义的情况 { cin>>x; }

 

c++学习

标签:

原文地址:http://www.cnblogs.com/8888jack/p/4336033.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!