易截截图软件、单文件、免安装、纯绿色、仅160KB

c数据类型问题,懂得朋友进来看看,谢谢

用dev-c++编译的
是c primer plus 的例题
程序如下:
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    unsigned int un = 3000000000; /* 32位int */
    short end = 200;
    long big = 65537;
    long long verybig = 12345678908426;
    printf ("un = %u and not %d\n",un, un);
    printf ("end = %hd and %d\n",end ,end);
    printf ("big = %ld and not %hd\n", big, big);
    printf ("verybig = %lld and not %d\n",verybig, verybig);
    system("PAUSE");
    return 0;
}
编译出警告:7 [Warning] this decimal constant is unsigned only in ISO C90
            10[Warning] integer constant is too large for "long" type

up

7 [Warning] this decimal constant is unsigned only in ISO C90
gcc有时候也有这个警告,加上 -std=c99 选项可以通过。 dev-c++没用过

10[Warning] integer constant is too large for "long" type
试试在常数后面加上LL  long long verybig = 12345678908426LL;


是编译器的问题吧!vs2008报错误、警告数都为零,能正常运行。

引用
7 [Warning] this decimal constant is unsigned only in ISO C90
gcc有时候也有这个警告


相关问答:

c基础

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

eclipse3.5+cdt编译c有问题

编译普通的c没问题啊,但编译javah生成的就报错:
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......

c陷阱与缺陷,说真的看过这本的觉得这书怎么样?

我个人感觉有的地方没必要看,繁琐得狠,用自己总结的方法更好,大家说说自己的意见
我感觉便捷计算与不对称边界完全根据自己的经验来,用不着看哦,大家说说

你看不看那是你的事

其实都是基础的东西啦

......

急问个c的面试题

C/C++ code:

void p1(const char **pname)
{
const char *name = "test1";
*pname = name;
}
void p2(const char **pname)
{
char *name = "test2";
*pname = name ......

C/C++版务贴-200910

请根据版规进行版务登记,提高版务透明度

本贴禁止灌水、广告,一经发现,一律删除,关小黑屋

如对版务有建议或者意见,可以在本贴中进行反馈


附:
C/C++版务贴-200907:http://top ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号