I have a question about the static function, not the c++ static method.
I know the static variable, but what is the static function?
Also, if you define void myfunc()
in another c file and include this c file, you cannot compile it
Why does static void myfunc()
compile normally?
The static
function is a function that only appears to files within the same file.
(Not exactly the same file, but the same translation)
If you have any questions
// other files cC
void myfunc(){
// What kind of code
}
//main파일.c
# include "other files c"
...
I think there is a link error because I wrote it with
// other files cC
void myfunc();
//main파일.c
# include "other files c"
myfunc()
{
// What kind of code
}
It will be compiled normally if you switch to
© 2024 OneMinuteCode. All rights reserved.