摘要:
#include <stdio.h> typedef int FuncType(int,int); //函数 typedef FuncType* FuncPointType; //函数指针 typedef FuncPointType ArrType[2]; //函数指针数组 int Add(int 阅读全文
摘要:
#include <stdio.h> typedef int FuncType(int,int); //函数 typedef FuncType* FuncPointType; //函数指针 typedef FuncPointType ArrType[2]; //函数指针数组 int Add(int 阅读全文
摘要:
#include <stdio.h> #include <string.h> typedef int FuncType(int,int); int Add(int a,int b) { return a + b; } int Sub(int a,int b) { return a - b; } vo 阅读全文
摘要:
1.使用C语言完成strcpy函数 #include<stdio.h> #include<assert.h> #include<string.h> char *Strcpy(char *dest,const char *src) { assert((src == NULL)||(dest == NU 阅读全文
摘要:
使用setting 可以将应用程序关闭前的数据都保存到系统的注册表当中 , 并且下次再打开程序时可以冲注册表中读取上一次关闭时的状态 需要注意的是保存到注册表中的数据 都是以键值对的形式存在 void SettingsGui::writeSettings() { //数据的存储 settings-> 阅读全文
摘要:
void MyText::slot_open() { //选择文件 QString path = QFileDialog::getOpenFileName(this,"选择文件",":/","头文件(*.h);;源文件(*.cpp);;所有文件(*.*)"); if(!path.isEmpty()) 阅读全文
摘要:
typedef pair<string,Student>pair_t; int main() { map<string,Student> mapstu; mapstu.insert(pair_t("2",Student("delaiwen",23))); mapstu.insert(pair_t(" 阅读全文
摘要:
int main() { set<Student> stuset; stuset.insert(Student("zhangsan",22)); //默认为升序 会自动调用<操作符重载 stuset.insert(Student("lisi",52)); stuset.insert(Student( 阅读全文
摘要:
int main() { list<Student> stulist; stulist.push_back(Student("zhangsan",22)); stulist.push_back(Student("lisi",23)); stulist.push_back(Student("lisi" 阅读全文
摘要:
//queue:先进先出,pop头部删除//stack:先进后出,pop尾部删除int main() { queue<Student> stuque; stuque.push(Student("zhangsan",22)); stuque.push(Student("lisi",22)); stuq 阅读全文
摘要:
他是一个双向队列,大部分内容和vector基本一致 主要是需要注意它是双向的,可头插,可尾插 int main() { deque<Student> deq_stu; deq_stu.push_back(Student("lisi",22)); deq_stu.push_back(Student(" 阅读全文
|