函数声明和调用
#include <stdio.h> int main(int argc, const char *argv[]) { void foo(); // 声明 (void) foo(); // 调用 return 0; } void foo (void) { printf ("foo\n"); }
#include <stdio.h> int main(int argc, const char *argv[]) { void foo(); // 声明 (void) foo(); // 调用 return 0; } void foo (void) { printf ("foo\n"); }
RT @http://tinyurl.com/ntssr 同是标准函数,看似 calloc 比 malloc 好用 用 -DNDEBUG 使 assert 失效 strtod 的第二个参数可以为 NULL
#include <iostream.h> typedef struct memory_area_struct { unsigned int start; unsigned int size; int used; } memory_area_t; #define NUM_MEM_AREAS 10 memory_area_t memory_map[NUM_MEM_AREAS] = { [0 ... (NUM_MEM_AREAS - 1)] = { .start = 0, .size = 0, .used = 0 }, };
RT @http://tolstoy.newcastle.edu.au/R/e6/devel/09/06/2037.html libtool: Version mismatch error. This is libtool 2.2, but the libtool: definition of this LT_INIT comes from libtool 2.2.6. libtool: You should recreate aclocal.m4 with macros from libtool 2.2 libtool: and run autoconf again. __ 按照提示要求修改 ltmain.sh 中的 VERSION 和 package_revision 即可解决