首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

为什么VS2010提示小弟我。没有命中短点啊

2012-11-09 
为什么VS2010提示我。没有命中短点啊??#include stdafx.h#include packet.h#include iostream#includ

为什么VS2010提示我。没有命中短点啊??
#include "stdafx.h"
#include "packet.h"
#include <iostream>
#include <Windows.h>
using namespace std;

#include <Windows.h>
using namespace std;



void PutInt(char *pPacket,int value,int &nPos)
{
*(int*)(pPacket + nPos) = value; //断点这行总是不到断点,, 控制台 aaaa也打印出来了!!! 什么原因nPos += sizeof(int);
cout<<"aaaaa"<<endl;
}
int GetInt(char *pPacket,int &nPos)
{
int value = *(int*)(pPacket + nPos);
nPos += sizeof(int);
return value;
}



int _tmain(int argc, _TCHAR* argv[])
{
int paketPos;
char packet[1024];
char temp[1024];

paketPos = 2;
PutInt(packet,520,paketPos);

cout<<"OK!!!"<<endl;

//获取
int value = GetInt(packet,paketPos);
cout<<value<<endl;

system("pause");
return 0;
}


[解决办法]
给数组赋值要这么不直观吗?

代码是给人看的,直观点好,优化与否等大神回复。
[解决办法]
断点断不到吗?
[解决办法]
关闭优化
重建所有

[解决办法]

探讨

提示我:可能原因:预处理指令编译器/连接器 优化!!!

热点排行