12 2024 档案
摘要:#include <iostream> using namespace std; int readfile(string name){ FILE *file=fopen(name.c_str(),"r"); if(file==NULL){ perror("文件打开失败"); return 1; }
阅读全文
摘要:#include <iostream> #include <fstream> using namespace std; int main(){ // char data[100]; // ifstream a; // a.open("j.txt"); // a>>data; // cout<<dat
阅读全文
摘要:#include <iostream> using namespace std; void dengluliuzi(){ printf("%s","恭喜你你出生你了\n"); printf("%s","你好不容易出生了。。你要??拯救之前失去的一切吗??\n"); printf("%s","\n")
阅读全文
摘要:#include <fstream> #include <cstdio> #include <iostream> using namespace std; struct wo{ string name; string sex; int age; int cm; int kiko; }; int ma
阅读全文
摘要://三个教室 //每个教室5个学生 //每个学生包含 姓名 年龄 成绩 //1.求一个教室内学生总成绩 //2.输出一个教室所有学生信息 //3.输出一个教室根据学生成绩排序后的所有信息 #include<iostream> using namespace std; struct Student{
阅读全文
摘要:1.创建结构体 成员变量 多个 成员函数 多个 其他结构体 多个 2.定义结构体变量 结构体名 变量名 3.调用 .成员访问符 for循环: for(1.初始条件;2.循环条件3.条件改变){ 4.表达式 } while: 1 while(2){ 4 3 } sort 使用 #include <bi
阅读全文
摘要:#include <iomanip> #include <iostream> using namespace std; struct nc{ char Name[100]; int ml; int id; double money; int kc; }; int main(){ /* 1 手打张娜
阅读全文