We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1d2dfc2 + bd87d2e commit d617df5Copy full SHA for d617df5
docs/error-messages/compiler-errors-1/compiler-error-c2129.md
@@ -13,3 +13,27 @@ static function 'function' declared but not defined
13
A forward reference is made to a **`static`** function that is never defined.
14
15
A **`static`** function must be defined within file scope. If the function is defined in another file, it must be declared **`extern`**.
16
+
17
+The following sample generates C2129:
18
19
+```cpp
20
+// C2129.cpp
21
+static void foo(); // C2129
22
23
+int main() {
24
+ foo();
25
+}
26
+```
27
28
+Possible resolution:
29
30
31
+// C2129b.cpp
32
+static void foo();
33
34
35
36
37
38
+static void foo() {}
39
0 commit comments