提交 fe5c7639 创建 作者: 赵鹏翀's avatar 赵鹏翀

init template

上级
/Debug
/Release
\ No newline at end of file
<?xml version="1.0" encoding="gb2312"?>
<ASMProject Version="1.00" Name="Demo008" TemplatePath="console(c)\Project" ProjectID="44831f59-b898-40ed-8f48-fbf1443d9b47" IsSubmitWork="0">
<Configurations>
<Configuration Name="Debug" DebuggerFlavor="0">
<Tool Name="PreBuildEventTool"/>
<Tool Name="CustomBuildTool"/>
<Tool Name="GCCCompilerTool" PreprocessorDefinitions="_DEBUG" GenerateDebugInformation="-1" LanguageStandard="c99"/>
<Tool Name="PreLinkEventTool"/>
<Tool Name="GCCLinkerTool"/>
<Tool Name="PostBuildEventTool"/>
</Configuration>
<Configuration Name="Release" DebuggerFlavor="0">
<Tool Name="PreBuildEventTool"/>
<Tool Name="CustomBuildTool"/>
<Tool Name="GCCCompilerTool" PreprocessorDefinitions="NDEBUG" LanguageStandard="c99"/>
<Tool Name="PreLinkEventTool"/>
<Tool Name="GCCLinkerTool" StripDebugInfo="-1"/>
<Tool Name="PostBuildEventTool"/>
</Configuration>
</Configurations>
<Files>
<Filter Name="ͷļ" Filter="h;hpp;hxx">
<File RelativePath=".\console.h">
</File>
</Filter>
<Filter Name="Դļ" Filter="cpp;c;cc;cxx">
<File RelativePath=".\console.c">
</File>
</Filter>
</Files>
</ASMProject>
添加文件
#include "console.h"
#include <windows.h>
DWORD dwOffset;
int main()
{
printf("**********各种数据类型的字长**********\n");
printf("The length of char is:%d字节\n", sizeof(char)); // 字符
printf("The length of short is:%d字节\n", sizeof(short)); // 字符
printf("The length of int is:%d字节\n", sizeof(int)); // 整形
printf("The length of long is:%d字节\n", sizeof(long)); // 长整形
printf("The length of unsigned long is:%d字节\n", sizeof(unsigned long));// 无符号长整形
printf("The length of float is:%d字节\n", sizeof(float)); // 单精度浮点型
printf("The length of double is:%d字节\n", sizeof(double)); // 双精度浮点型
printf("The length of DWORD is:%d字节\n", sizeof(DWORD)); // 双字
char s[2] = "AB";
int a = 15;
long b = 65537;
unsigned long f = 100000;
float c = 0.33;
double d = 0.02;
DWORD q = 0x12345678;
}
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
#include <stdio.h>
/* TODO: 在此处引用程序需要的其他头文件 */
#endif /* _CONSOLE_H_ */
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论