- 博客(3)
- 收藏
- 关注
原创 一个获取当前鼠标坐标和颜色rgb值的小程序
<br />这是一个小程序,主要功能是获取当前鼠标的坐标和颜色值。主要用到两个win32 api 函数,<br />一个是GetCursorPos()//得到鼠标坐标<br />一个是GetPixel()//得到当前坐标下屏幕的颜色值<br />代码如下。<br /> #include <iostream> #include <windows.h> using namespace std; bool IsMouseMove(); int main(void) { POINT p,o;
2010-11-24 20:37:00 3184
原创 临时变量问题
临时变量的问题,哈哈,代码如下#include char* fun() { char* p = "hello"; return p; } char* fun1() { char p[] = "hello"; return p; } int main( ) { printf( fun() ); printf( fun1() ); return 0; }问输出结果是什么,为什么。答案。。。。。。。。。。。。。。。。。第
2010-11-23 14:05:00 248
原创 逗号表达式
一段很有意思的代码 int x=4;求表达式(x*5,x+20),x+25 的值,很悲剧的写法,呵呵值到底是什么呢,只有写出代码看了[code=C/C++]#include using namespace std;int main(){ int x=4; int y = ((x*5,x+20),x+25); cout system("pause"); return 0;}[/code]结果值应该为x+25的值,为29,真是蛋疼的题目,
2010-11-09 20:15:00 277
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人