摘要: #include ... ...QMessageBox::warning(this,"window title","Please Choose One Item!"); 阅读全文
posted @ 2014-01-18 17:13 蓝蓝鱼鱼 阅读(121) 评论(0) 推荐(0) 编辑
摘要: vector的erase函数,记住该函数会使迭代器失效,返回下一个迭代器。#include "stdafx.h"#include#include#includeusing namespace std;int _tmain(int argc, _TCHAR* argv[]){ vector iVec; vector::iterator it; int i; for( i=0;i<10;i++) iVec.push_back(i); for( i=0;i<iVec.size();i++) cout<<iVec[i]<<ends; cout&l 阅读全文
posted @ 2014-01-18 17:07 蓝蓝鱼鱼 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: 第一种:struct Student{ ... ...}; Student为结构体名,相当于一种数据类型。可以和int、char等一样的用法。 a. 这种形式用在C语言中,要声明该结构体类型的对象,应该写为struct Student stud1; b. 这种形式用在C++语言中,要声明其对象,直接写Student stud1;第二种:typedef struct Student{ ... ...}Stu; //Stu是一种数据类型等同于:typedef struct { ... ...}Stu; //Stu是一种数据类型 Stu是名为Student的结构体这一数据类型的别名,c/c++... 阅读全文
posted @ 2014-01-14 16:26 蓝蓝鱼鱼 阅读(194) 评论(0) 推荐(0) 编辑