如下:
vector<int> _vecTest;
_vecTest.push_back(10);
_vecTest.push_back(11);
int aaa = -1;
bool _bMaxMin = (aaa >= _vecTest.size());
如上, _bMaxMin 值为 true;
Why??????……继续阅读 »
9年前 (2016-06-07) 2056浏览
0个赞
sqlite的api格式是这样的
#ifndef SQLITE_API
# define SQLITE_API
SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
SQ……继续阅读 »
9年前 (2016-06-07) 1076浏览
0个赞
使用VC6.0编辑器运行下面程序输出异常:
omniORB: From endpoint: giop:tcp:127.0.0.1:3881. Detected GIOP 1.2 protocol erro
r in input message. giopImpl12.cc:289. Connection is closed.
Client.main() Ex……继续阅读 »
9年前 (2016-06-07) 2093浏览
0个赞
#include <iostream>
#include <math.h>
#include <cstring> /* 字符处理库 */
#include <iomanip> /* setw(行宽) */
#include <cstdio>
using namespace std;
int mai……继续阅读 »
9年前 (2016-06-07) 1129浏览
0个赞
题目是字符串最后一个单词长度,当没有单词时返回0,当有两个以上单词时可以正常判断,为什么只有一个单词的时候会把c[0]判断为”\0″进入上面的条件?
int length;
char c[1000] = { 0 };
int i = 0,l = 0;
cin >> c;
cin.getline(c, 1000);
if (……继续阅读 »
9年前 (2016-06-07) 1393浏览
0个赞
class ConvertTo {};
class COnvertable
{
public:
explicit operator ConvertTo () const
{
return ConvertTo();
};
};
void Func(ConvertTo ct)
{
}
void test ()
{
COnvertable c;
ConvertTo……继续阅读 »
9年前 (2016-06-07) 1199浏览
0个赞
void GameLogic::WriteReplayTxt(FactoryPlayerNodeDef *pPlayerNode, void * pMsg,int iMsgType,int iMsgLen)
{
if (pPlayerNode == NULL)
{
return;
}
int iRoomNum = pPlayerNode->cRoomN……继续阅读 »
9年前 (2016-06-07) 2939浏览
0个赞
大致就像下面这个例子写的那样。
test::run是作者遗留下来的垃圾吗
#include <stdio.h>
class test
{
public:
virtual void run() = 0;
virtual void prerun();
};
inline void test::run()
{
printf("test::fun(……继续阅读 »
9年前 (2016-06-07) 1346浏览
0个赞
先上图
#include <vector>
#include <iostream>
using namespace std;
#define item vector<int>::iterator
item search(item beg, item end, int val)
{
for (; beg != end; b……继续阅读 »
9年前 (2016-06-07) 1397浏览
0个赞