add forward declaration

add classes
This commit is contained in:
2025-09-15 18:17:50 +02:00
parent 6cc9643a3d
commit 27a9acdee6
17 changed files with 628 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "functions.h"
void functionB() {} // declared & defined
void functionC(); // declared
void functionD(); // declared
int main()
{
//functionA(); // compiler error, because function is declared & defined after this call
functionB(); // no error
//functionC(); // linker error, because function is declared, but not defined
functionD(); // no error
functionE(); // no error
return 0;
}
void functionA() {} // declared & defined
void functionD() {} // defined