随笔分类 -  c++

摘要:学堂在线中郑莉老师对虚函数进行了详细的讲解具体的代码如下#include using namespace std;class Base1 {public: virtual void display() const; //虚函数};void Base1::display() const { ... 阅读全文
posted @ 2017-04-13 11:21 开往春天的拖拉机 阅读(94) 评论(0) 推荐(0)
摘要:底层的程序员一定会遇到二进制的问题#include #include #include using namespace std;//整数转换为string类型string int2str(int n){ stringstream ss; string s; ss>s; return s;}//将十进... 阅读全文
posted @ 2017-03-28 17:10 开往春天的拖拉机 阅读(133) 评论(0) 推荐(0)
摘要:底层的程序员一定会遇到二进制的问题#include #include #include using namespace std;//整数转换为string类型string int2str(int n){ stringstream ss; string s; ss>s;... 阅读全文
posted @ 2017-03-28 17:10 开往春天的拖拉机 阅读(110) 评论(0) 推荐(0)
摘要:写类的hello,world程序 如下#include using namespace std;#include class A{ protected: string a; public: A(){ a =... 阅读全文
posted @ 2017-03-14 19:09 开往春天的拖拉机 阅读(76) 评论(0) 推荐(0)
摘要:写类的hello,world程序 如下#include using namespace std;#include class A{ protected: string a; public: A(){ a ="hello,world"; ... 阅读全文
posted @ 2017-03-14 19:09 开往春天的拖拉机 阅读(122) 评论(0) 推荐(0)
摘要:// test.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "stdio.h"#include #include using namespace std;int _tmain(int argc, _TCHAR* argv[])... 阅读全文
posted @ 2017-03-06 15:12 开往春天的拖拉机 阅读(101) 评论(0) 推荐(0)
摘要:// test.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "stdio.h"#include #include using namespace std;int _tmain(int argc, _TCHAR*... 阅读全文
posted @ 2017-03-06 15:12 开往春天的拖拉机 阅读(101) 评论(0) 推荐(0)
摘要:c++ 从入门到放弃#include using namespace std;int main(){ return 0; cout<<"hello,world"<<endl;} 阅读全文
posted @ 2017-02-20 15:40 开往春天的拖拉机 阅读(112) 评论(0) 推荐(0)
摘要:c++ 从入门到放弃#include using namespace std;int main(){ return 0; cout<<"hello,world"<<endl;} 阅读全文
posted @ 2017-02-20 15:40 开往春天的拖拉机 阅读(121) 评论(0) 推荐(0)