From: stephan b. <sg...@us...> - 2004-12-23 02:02:13
|
Update of /cvsroot/pclasses/pclasses2/toc/tests/cpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14924 Added Files: type_sizes.cpp Log Message: egg --- NEW FILE: type_sizes.cpp --- #include <iostream> #define OUT(M,T) std::cout << prefix << "_SIZEOF_"<<# M << "="<<sizeof(T)<<"\n"; int main( int argc, char **argv ) { if( 2 != argc ) { std::cerr << "Usage: "<<argv[0]<<" var_prefix\n"; return 1; } const char * prefix = argv[1]; OUT(CHAR,char); OUT(INT,int); OUT(LONG,long); OUT(LONG_LONG,long long); OUT(SHORT,short); // OUT(__INT64,int64); return 0; } |