![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C
文章平均质量分 57
Vic020
这个作者很懒,什么都没留下…
展开
-
C++ 中int,char,string,CString类型转换
C++ 中int,char,string,CString类型转换(一) 1. c++中string到int的转换1) 在C标准库里面,使用atoi:#include #include std::string text = "152"; int number = std::atoi( text.c_str() ); if (errno == ERANGE)原创 2013-03-07 09:33:39 · 1066 阅读 · 0 评论 -
C语言 推箱子小游戏 可重玩 可选关 保存记录
转载请保留此行,来自Vic___这是DLNU大一的题目,估计我发上来后,这个课题的难度大大降低。可以随意增加地图根据20*20的画就行0:可移动 1:墙 2:目的地 3:箱子 5:玩家记得也要增加“存在关数” //-----------------------------------//// version 1.0// From Vi原创 2013-03-10 01:37:46 · 3659 阅读 · 7 评论 -
C/C++ 测试程序运行时间
做测序设计的时候,会有小程序需要调试时间复杂度,来个不是理论上测试方法。测试实际的计算时间。#include#include#includeusing namespace std; int main(){ int start = clock(); //开始时间 int pause = clock(); //暂停时间 system("pause"); in原创 2013-04-07 16:06:19 · 1157 阅读 · 0 评论 -
C/C++ 获得键盘按键代码
写推箱子小游戏的时候需要读取键盘写了个快速获得代码的小程序#include#includeint main(){ int a; while(1) { a=getch(); std::cout<<a<<std::endl; } return 0;}原创 2013-04-07 16:18:28 · 8357 阅读 · 0 评论 -
编程之美2013 资格赛 第一题 解题报告
传话游戏时间限制: 1000ms 内存限制: 256MB描述Alice和Bob还有其他几位好朋友在一起玩传话游戏。这个游戏是这样进行的:首先,所有游戏者按顺序站成一排,Alice站第一位,Bob站最后一位。然后,Alice想一句话悄悄告诉第二位游戏者,第二位游戏者又悄悄地告诉第三位,第三位又告诉第四位……以此类推,直到倒数第二位告诉Bob。两位游戏者在传原创 2013-04-08 12:26:05 · 1530 阅读 · 1 评论 -
MFC 窗体的调用
查了很多资料,都说DoModal()返回值为OK或CANCEL键的ID 其实,这种说法是错误的 MSDN是这样说明其返回值的 If successful, the value of the nRetCode parameter specified in the call to EndDialog; otherwise, -原创 2013-04-22 22:28:29 · 1041 阅读 · 0 评论