2021年2月

保留dev-c++编译出的obj等文件   在调用gcc时,加上save-temps参数即可。 gcc -save-temps hello.c   编译过程中生成的.s .o .i 都会保留。   通过以下方法可设置dev-c++开发环境的编译参数:   1,Tools->Compiler Options   2,在Compiler Options对话框的General标签卡中,选中Add the following commands where calling the com...

大端序和小端序   学过计算机程序设计后应该知道大端序和小端序的概念,但是在真正使用的时候,如何才能分清计算机到底是用什么顺序存储数据的?   先看下基本概念:   1、大端模式:高字节保存在内存的低地址   2、小端模式:高字节保存在内存的高地址   可用以下代码来做验证: #include <stdio.h> int main() { int a; a=0x7C7D7E7F; char *pa; pa=&a; int i; ...