| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3212 人关注过本帖
标题:为何该程序生成的BMP图像打不开??
只看楼主 加入收藏
BlueGuy
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:29
帖 子:4476
专家分:4055
注 册:2009-4-18
收藏
得分:0 
PC-lint for C/C++ (NT) Vers. 8.00x, Copyright Gimpel Software 1985-2008

--- Module:   C:\Documents and Settings\Administrator\桌面\b.c (C)
        system("pause");
C:\Documents and Settings\Administrator\桌面\b.c(64): error 534: (Warning -- Ignoring return value of function 'system(const char *)' (compare with line 316, file C:\VC6\VC98\Include\stdlib.h))
C:\VC6\VC98\Include\stdlib.h(316): error 830: (Info -- Location cited in prior message)
    bmp_map_file.bfSize = 14 + 40 + width * height * 3;
C:\Documents and Settings\Administrator\桌面\b.c(69): error 732: (Info -- Loss of sign (assignment) (long to unsigned long))
    bmp_map_info.biHeight = height;
C:\Documents and Settings\Administrator\桌面\b.c(78): error 732: (Info -- Loss of sign (assignment) (long to unsigned long))
    bmp_map_info.biWidth = width;
C:\Documents and Settings\Administrator\桌面\b.c(79): error 732: (Info -- Loss of sign (assignment) (long to unsigned long))
    bmp_map_info.biSizeImage = width*height*3;
C:\Documents and Settings\Administrator\桌面\b.c(83): error 732: (Info -- Loss of sign (assignment) (long to unsigned long))
    if((bmp_data=(RGB*)malloc(width * height * 3)) == NULL)
C:\Documents and Settings\Administrator\桌面\b.c(90): error 732: (Info -- Loss of sign (arg. no. 1) (long to unsigned int))
    fwrite(bmp_data, sizeof(RGB), date_size, bmp_file);
C:\Documents and Settings\Administrator\桌面\b.c(102): error 732: (Info -- Loss of sign (arg. no. 3) (long to unsigned int))
}

C:\Documents and Settings\Administrator\桌面\b.c(109): error 783: (Info -- Line does not end with new-line)

    --- Wrap-up for Module: C:\Documents and Settings\Administrator\桌面\b.c

C:\Documents and Settings\Administrator\桌面\b.c(110): error 766: (Info -- Header file 'C:\VC6\VC98\Include\time.h' not used in module 'C:\Documents and Settings\Administrator\桌面\b.c')
C:\Documents and Settings\Administrator\桌面\b.c(110): error 766: (Info -- Header file 'C:\VC6\VC98\Include\malloc.h' not used in module 'C:\Documents and Settings\Administrator\桌面\b.c')
C:\Documents and Settings\Administrator\桌面\b.c(110): error 766: (Info -- Header file 'C:\VC6\VC98\Include\conio.h' not used in module 'C:\Documents and Settings\Administrator\桌面\b.c')
C:\Documents and Settings\Administrator\桌面\b.c(110): error 766: (Info -- Header file 'C:\VC6\VC98\Include\pshpack2.h' not used in module 'C:\Documents and Settings\Administrator\桌面\b.c')
C:\Documents and Settings\Administrator\桌面\b.c(110): error 766: (Info -- Header file 'C:\VC6\VC98\Include\poppack.h' not used in module 'C:\Documents and Settings\Administrator\桌面\b.c')

--- Global Wrap-up

 error 900: (Note -- Successful completion, 14 messages produced)
工具返回代码: 14

我就是真命天子,顺我者生,逆我者死!
2011-04-10 19:34
你们都要疼我哦
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:火星
等 级:贵宾
威 望:49
帖 子:1296
专家分:2746
注 册:2008-7-13
收藏
得分:0 
用微软VC6以上的编译器,__declspec(align(n))和#pragma pack(n)搭配使用可以精确控制对齐,前几个月我才从wrk里偷学到

小妹,哥哥看你骨骼清奇,绝非凡人,将来必成大业,不如这样,你先把裤裤脱了,待哥哥为你开启灵窍,然后我们一起努力钻研如何
2011-04-11 16:17
快速回复:为何该程序生成的BMP图像打不开??
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016596 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved