相关疑难解决方法(0)

我在哪里可以找到当前的C或C++标准文档?

对于许多问题,答案似乎可以在"标准"中找到.但是,我们在哪里找到它?最好是在线.

谷歌搜索有时会觉得徒劳,尤其是对于C标准,因为他们在编程论坛的大量讨论中被淹没.

要开始这个,因为这些是我现在正在搜索的,那里有很好的在线资源:

  • C89
  • C99
  • C11
  • C++ 98
  • C++ 03
  • C++ 11
  • C++ 14

c c++ standards c++-faq

394
推荐指数
8
解决办法
12万
查看次数

C中的头文件和源文件如何工作?

我仔细研究了可能的副本,但是没有任何答案在沉没.

tl; dr:源文件和头文件是如何相关的C?项目是否在构建时隐式地整理声明/定义依赖项?

我试图理解编译器如何理解.c.h文件之间的关系.

鉴于这些文件:

header.h:

int returnSeven(void);
Run Code Online (Sandbox Code Playgroud)

source.c:

int returnSeven(void){
    return 7;
}
Run Code Online (Sandbox Code Playgroud)

main.c:

#include <stdio.h>
#include <stdlib.h>
#include "header.h"
int main(void){
    printf("%d", returnSeven());
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

这个混乱会编译吗?我目前正在使用Cygwin的gccNetBeans 7.0中完成我的工作,它可以自动执行大部分构建任务.编译项目时,涉及的项目文件是否根据声明中的隐含包含?source.cheader.h

c compilation header-files

51
推荐指数
4
解决办法
6万
查看次数

标签 统计

c ×2

c++ ×1

c++-faq ×1

compilation ×1

header-files ×1

standards ×1