关于__be32_to_cpu的字节转换问题
在一个LINXU的程序中发现这个宏__be32_to_cpu,大端定义是unsigned int,小端的定义是__swab32,查看__swab32又定义为#if defined(__GNUC__) && (__GNU…
请教这个const成员有什么问题?
代码如下: #include "string.h" class String { public: String(const char *buf) { _buf = new char[strlen(buf) + 1]; st…
一个简单的问题,这样写是不是不太好: while (ERROR1 == (ret = do_sth() ) ) {...}
问一个简单的问题,这样写是不是不太好: while (ERROR1 == (ret = do_something() ) ) {...} 比如这样: 2084 while (READ_ERR == (ret = tcp_re…
R7RS small language
R7RS.pdf 新特性: * Modules have been added as a new program structure to improve encapsulation and sharing of code. Some existing and new…
怎么样才能使C语言的程序的可维护性可以提高??
C++天生的就是为了高维护性的而生的,但是C语言呢? 现在那么年过去了,应该也有手段让C语言的程序提高可维护性,例如Makefile,配置文件什么的。 我…
linux下 ftp 数据上传状态检测实现
最近工作需要,在linux平台上,ftp向server端上传数据时有时候可以由于种种原因上传不成功。 这样的话,我们必须在程序里面能检测ftp上传文件的状态。…
need help for "no matching function for call to ..."
code: Observable Expectation_Value_X2( "obsX2", 1, Obs_Expectation_Value_X2, phii); for( int it = 0 ; it <= 2 ; it++ ) { doubl…
linux socket recv 出现报错resource temporarily unavailable
本帖最后由 liyandong106 于 2011-04-17 20:19 编辑 求帮助、nrecv = recv(fd, bp, data_len, 0); //debug(255)("->%s\n", data); …
求师傅指导一下,滴水之恩,他日定当涌泉相报~~~
本帖最后由 ljsdaya 于 2011-04-21 13:13 编辑 THX~~~~ I WILL DO WELL! Someone complain about the educational system~ I just say: no word!…