由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - how to use a variable to represent interger which is bigger than 32768?
相关主题
Re: how to use a variable to represent interger which is bigger than 3where is libstdc++
Sorry, my bad Re: how to use a variable to represent interger which is bigger than 3GCC的编译?
idb problem (转载)漆血柜求
有没有四舍无入的函数?[转载] ask a question.
Questions about MakefileGCC 一问
[转载] 请教三个关于emacs和perl的问题Help: convert // to /* */ in C code?
A tough compiler problemabout compiling new glibc/gcc in fc14 (转载)
[转载] molscript and grasphelp needed-install gcc/g++ 4.7 on ubuntu 14.04
相关话题的讨论汇总
话题: 32768话题: represent话题: long话题: interger话题: variable
进入Unix版参与讨论
1 (共1页)
h****r
发帖数: 2056
1
Assume,
long a = 32767;
long b = 4;
long c = 5;
we know the upper limit of long is 32768,
Linux can not recognize the following expression:
cout << a*b+c;
it will pass the compile, but can not output the correct
result.
How to represent the a*b+c correctly here?
Thanks.
1 (共1页)
进入Unix版参与讨论
相关主题
help needed-install gcc/g++ 4.7 on ubuntu 14.04Questions about Makefile
DD weijing![转载] 请教三个关于emacs和perl的问题
[转载] How to remove an Environment variable on SolarisA tough compiler problem
equivilent $REMOTEHOST in ksh[转载] molscript and grasp
Re: how to use a variable to represent interger which is bigger than 3where is libstdc++
Sorry, my bad Re: how to use a variable to represent interger which is bigger than 3GCC的编译?
idb problem (转载)漆血柜求
有没有四舍无入的函数?[转载] ask a question.
相关话题的讨论汇总
话题: 32768话题: represent话题: long话题: interger话题: variable