About 66 results
Open links in new tab
  1. How to correctly use the extern keyword in C - Stack Overflow

    Jan 31, 2009 · 16 In C, extern is implied for function prototypes, as a prototype declares a function which is defined somewhere else. In other words, a function prototype has external linkage by default; …

  2. Effects of the extern keyword on C functions - Stack Overflow

    The extern keyword takes on different forms depending on the environment. If a declaration is available, the extern keyword takes the linkage as that specified earlier in the translation unit.

  3. How do I use extern to share variables between source files?

    1282 I know that global variables in C sometimes have the extern keyword. What is an extern variable? What is the declaration like? What is its scope? This is related to sharing variables across source …

  4. When to use extern in C++ - Stack Overflow

    I'm reading "Think in C++" and it just introduced the extern declaration. For example: extern int x; extern float y; I think I understand the meaning (declaration without definition), but I wonde...

  5. C语言extern的理解(新手)? - 知乎

    C语言extern的理解(新手)? extern提示编译器变量定义在别处,让它去找 我是不是可以理解为extern int a;这句话等价于int a(把int a搬过来用,但不分配内存… 显示全部 关注者 10 被浏览

  6. Extern functions in C vs C++ - Stack Overflow

    There's [almost] never any need to use the keyword extern when declaring a function, either in C or in C++. In C and in C++ all functions have external linkage by default. The strange habit of declaring …

  7. Why would you use 'extern "C++"'? - Stack Overflow

    Mar 4, 2009 · In this article the keyword extern can be followed by "C" or "C++". Why would you use 'extern "C++"'? Is it practical?

  8. смысл ключевого слова extern? - Stack Overflow на ...

    Всем привет.Я не понимаю смысл ключевого слова extern. У меня 2 файла компиляции 1.cpp и 2.cpp в 1 пишу объявления функции int foo(); а во 2 определяю: int foo(){ return 3; } И в чем …

  9. c - 宣言と定義の違い、extern宣言の意義 - スタック・オーバーフロー

    Jan 9, 2018 · int a;←宣言 int b=10;←宣言と定義 int c; c=100;←これは宣言と何でしょうか? あとextern宣言の必要性が分かりません...。 事前に話し合って特定の変数を定義しなければいいだけで …

  10. C: What is the use of 'extern' in header files? - Stack Overflow

    Oct 4, 2012 · The extern keyword is used to share variables across translation units. When you declare variables in a header file, those variables are already included in the translation unit (.cpp) file that …