码迷,mamicode.com
首页 >  
搜索关键字:qt cin cout cerr    ( 22206个结果
杭电 2012
1 #include 2 3 using namespace std; 4 5 int is_prime(int ); 6 int main() 7 { 8 int x,y,val; 9 while (cin>>x>>y && x||y)10 {11 ...
分类:其他好文   时间:2014-05-16 22:43:26    阅读次数:335
杭电 2024
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 string str; 9 int flag;10 while (cin>>n)11 {12 ...
分类:其他好文   时间:2014-05-16 06:05:15    阅读次数:377
hdu AC me
/* * hdu AC Me * date 2014/5/13 * state AC */ #include #include #include #include using namespace std; const int MAXN=100001; char Arr[MAXN]; int cnt[26]; int main() { //cout << "Hello wor...
分类:其他好文   时间:2014-05-15 06:16:24    阅读次数:247
C++ Primer 学习笔记_69_面向对象编程 --继承情况下的类作用域
面向对象编程--继承情况下的类作用域引言: 在继承情况下,派生类的作用域嵌套在基类作用域中:如果不能在派生类作用域中确定名字,就在外围基类作用域中查找该名字的定义。 正是这种类作用域的层次嵌套使我们能够直接访问基类的成员,就好像这些成员是派生类成员一样: Bulk_item bulk; cout 名字book的使用将这样确定[先派生->后基类]: 1)bulk是Bulk_item类...
分类:编程语言   时间:2014-05-15 05:37:41    阅读次数:364
备忘之 拷贝构造函数
//拷贝构造函数,什么时候算是 “合适的时候”,才会合成呢~~~ #include using namespace std; class A { public:     A(char *_str):str(_str),x(0){}     //A(const A&a){cout     //如果没有定义的话,对于类A来说,编译器依然不会合成,因为此时的对象之间的...
分类:其他好文   时间:2014-05-15 05:11:13    阅读次数:334
java 读取并且显示 txt 文件
系统:mac os x 10.9eclipse在eclipse 中建立一个project, 命名为Cin_txt,Cin_txt的内容testwanghelloworld以下是输入的代码import java.io.File;import java.io.FileInputStream;import...
分类:编程语言   时间:2014-05-14 11:07:42    阅读次数:341
operator->
在学习Stl的过程中,经常看到->符号的重载,但一直不太明白。 今天做了一个小测试,来看看如果调用它。 以list的迭代器为例,在 pointer operator->() const { return &(operator*());}中加入 cout str_list; str_list.push...
分类:其他好文   时间:2014-05-14 10:32:52    阅读次数:221
Qt设置windows系统时间
Qt设置windows系统时间网上的回答很多,但很少有一步到位的,一般会有8小时时差,下面给出直接解决代码: #include "windows.h"void Dialog::setTime() { SYSTEMTIME st; GetLocalTime(&st);//关键在这里 st.wHour....
分类:Windows程序   时间:2014-05-14 10:29:48    阅读次数:308
杭电2019
1 #include 2 using namespace std; 3 4 int main() 5 { 6 int a[110] = {0};//已经排好的 7 int n,m; 8 while (cin>>n>>m && n||m) 9 {10 ...
分类:其他好文   时间:2014-05-14 09:43:38    阅读次数:407
Qt编译错误GL/gl.h: No such file or directory
最近把系统换成ubuntu14.04的了,在安装Qt后,我运行了里面的一个示例,发现编译有错: 其实我以前就遇到过这个问题,我当时给我的朋友写了一封邮件,他告诉我说是因为系统中没有安装OpenGL库导致的,所以我们要安装OpenGL库及其工具: 这个是他当时给我回的邮件,我发现我现在的系统中没有最后一个软件,可能是因为新系统换了比较新的软件源的关系吧。我的做法是运行这个命令 zhiniaob...
分类:其他好文   时间:2014-05-13 15:34:43    阅读次数:272
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!