[Assorted-commits] SF.net SVN: assorted:[899] sandbox/trunk/src/cc/longlongint.cc
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-07-18 08:38:36
|
Revision: 899 http://assorted.svn.sourceforge.net/assorted/?rev=899&view=rev Author: yangzhang Date: 2008-07-18 08:38:42 +0000 (Fri, 18 Jul 2008) Log Message: ----------- Modified Paths: -------------- sandbox/trunk/src/cc/longlongint.cc Modified: sandbox/trunk/src/cc/longlongint.cc =================================================================== --- sandbox/trunk/src/cc/longlongint.cc 2008-07-18 08:38:25 UTC (rev 898) +++ sandbox/trunk/src/cc/longlongint.cc 2008-07-18 08:38:42 UTC (rev 899) @@ -2,6 +2,9 @@ #include <string> #include <typeinfo> +// doesn't work: doesn't give us INT64_C() +// #include <stdint.h> + using namespace std; void f(int64_t x) { cout << x << endl; } @@ -21,15 +24,23 @@ int64_t y = 32; f(y); // f(0LL); + + // size of the various ints cout << sizeof(int64_t) << endl; cout << sizeof(long long) << endl; cout << sizeof(long int) << endl; cout << sizeof(long) << endl; + cout << sizeof(int) << endl; cout << sizeof(0LL) << endl; cout << sizeof(0L) << endl; - cout << typeid(int64_t).name() << endl; - cout << typeid(long long).name() << endl; - cout << typeid(string).name() << endl; + + // names are not very helpful + // cout << typeid(int64_t).name() << endl; + // cout << typeid(long long).name() << endl; + // cout << typeid(string).name() << endl; + + // doesn't work + // cout << INT64_C(0) << endl; return 0; } @@ -44,9 +55,6 @@ * 8 * 8 * 8 - * l - * x - * Ss * * on 32-bit machines: * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |