一个函数,明明返回假,可执行时却按真的路线执行,后来找到了问题所在,原来是bool的使用问题,下面这段代码可能没有问题,但是有隐患,因为函数返回的值只占用al,而如果判断时却用的语句为test eax, eax
[code]
#include
by er - C/C++ - 2006-08-09 12:48:53 阅读(3287) 回复(23)
环境: CentOS 5 + BASH 每次用export时总会看到后面一个提示: not a valid identifier ,但export后的PATH可以正常使用. 何故? 如下: [root@lovexia shell]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/ossec/bin [root@lovexia shell]# PATH=$PATH:/usr/local/mysql/bin [root@lovexia shell]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi...
我的数据库中, 有history_product, product, stateA_product, stateB_product等几个表, 存放的都是product这样的一个数据, 为了唯一标识product, 定义了 create table idtable( idtype varchar(32), id int unsigned) ENGINE=INNODB; 然后每次都用 begin; select id from idtable where idtype='xxx' for update; insert into product values(id_from_idtable, ...); update idtable set id=id+1 where idtype='xxx'; commit; 这...
为什么我编译总是会出现这样的问题,也在google 八毒,搜了很多都是没有解决问题;
g++ -o main main.cpp
/tmp/cc0i2cum.o(.text+0x14c): In function `main':
: undefined reference to `GDK::CFile::CFile(std::basic_string
我的metalink帐户中有Support identifier ,我在service request中create sr时在 "Support identifier"项中提示"NO VALID CSI FOUND". 想问一下: Support identifier和CSI是同一个号码吗? 如果不是的话我可以通过Support identifier获得CSI号码吗?
Index created. DROP TABLE Smdr_Netflow_HostToHostApp_Hier * ERROR at line 1: ORA-00972: identifier is too long CREATE TABLE Smdr_Netflow_HostToHostApp_Hier ( * ERROR at line 1: ORA-00972: identifier is too long 0 rows deleted. 1 row created. 0 rows deleted. 1 row created. CREATE INDEX NetflowHostToHostAppHierhiertp0 ON Smdr_Netflow_HostToHostApp_Hier (timeZone...
我们单位上的一个磁盘阵列分成了几个hdisk ,当我用lspv hdisk4时,有一栏为: PV identifier: 00039er33ii223a 想问一下:这个PV ID 是随机分配的,还是固定死了的. 另外我lspv hdisk7时,出现: physical volume 000000000000000 is not assigned to volume group 。 这里怎么pv id 全是0了呢?