C++
一线生
https://github.com/smallcham
展开
-
结构体定义
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;struct act{ char ch[101]; float a; double c;};int mai原创 2012-07-31 23:48:34 · 390 阅读 · 0 评论 -
结构体输出
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;struct act{ char ch[101]; float a; double c;};int mai原创 2012-07-31 23:49:58 · 1261 阅读 · 0 评论 -
简单的结构体成员赋值
#include "stdafx.h"#include "iostream"#include "windows.h"#include "string"#include "cstring"using namespace std;struct ch{ char name[21]; int num; string party;};int main(int argc, cha原创 2012-08-29 23:50:02 · 1189 阅读 · 0 评论 -
字符串输入输出cin.get的用法
#include "stdafx.h"#include "iostream"#include "windows.h"#include "string"#include "cstring"using namespace std;int main(int argc, char* argv[]){ char name[21],ch[21]; int age; cout<<"Ple原创 2012-08-28 21:18:19 · 844 阅读 · 0 评论 -
string类的io和char类比较 初始字符长度不一样
#include "stdafx.h"#include "iostream"#include "windows.h"#include "string"#include "cstring"using namespace std;int main(int argc, char* argv[]){ char ch1[21]; string ch2; cout<<strlen(ch原创 2012-08-28 22:27:12 · 551 阅读 · 0 评论 -
莫名其妙的数据结构学习过程
#include "stdafx.h"#include "windows.h"#include "string"#include "iostream"using namespace std;struct Student{ int num; string name; int age;};int main(int argc,char *argv){ Student原创 2012-08-31 09:05:58 · 420 阅读 · 0 评论 -
String 类型与 char 类型比较
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;int main(int argc, char* argv[]){ char name[101]; string原创 2012-07-31 23:34:19 · 984 阅读 · 0 评论 -
驱车里程
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ double yl; cout<<"Please input\n"; cin>原创 2012-07-31 23:14:52 · 781 阅读 · 0 评论 -
度分秒输入纬度 度输出
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ double D; int d,f,m; cout<<"Please inpu原创 2012-07-31 23:01:04 · 975 阅读 · 0 评论 -
(API) 老题了 圆面积
#include "stdafx.h"#include "iostream"#include #include #include "resource.h"#include "MainDlg.h"using namespace std;BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)原创 2012-07-13 23:27:16 · 986 阅读 · 0 评论 -
四则运算器
#include "stdafx.h"#include "iostream"#include #include #include "resource.h"#include "MainDlg.h"using namespace std;BOOL WINAPI Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)原创 2012-07-15 20:54:46 · 496 阅读 · 0 评论 -
扩展
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;struct act{ string ch; float a; double c;};int main(i原创 2012-07-31 23:52:31 · 378 阅读 · 0 评论 -
Please Enter your name
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ char name[101]; char nam1[101]; cout<<"原创 2012-07-31 23:29:13 · 2371 阅读 · 0 评论 -
String 类型的用法
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"#include "string"using namespace std;int main(int argc, char* argv[]){ string ch1="asdasd",ch2原创 2012-07-31 23:40:28 · 390 阅读 · 0 评论 -
找到编码为88的字符
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ char ch='A'; while(ch<='z') { if(ch==原创 2012-07-31 22:41:06 · 750 阅读 · 0 评论 -
身高转英尺
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ double cm; cout.setf(ios_base::fixed,ios原创 2012-07-31 22:53:28 · 1436 阅读 · 0 评论 -
输秒求天
#include "stdafx.h"#include "windows.h"#include "iostream"#include "stdlib.h"#include "climits"using namespace std;int main(int argc, char* argv[]){ int mine; cout<<"Please input \n"; cin>原创 2012-07-31 23:11:28 · 1972 阅读 · 0 评论 -
简单的结构数组 先预占一些位置吧
#include "stdafx.h"#include "iostream"#include "windows.h"#include "string"#include "cstring"using namespace std;struct ch{ char name[21]; int num; string party;};int main(int argc, cha原创 2012-08-30 22:57:08 · 924 阅读 · 0 评论