Last active
January 12, 2024 14:07
-
-
Save koron/9398af31503fb286d79401d4e76ce5a3 to your computer and use it in GitHub Desktop.
foo() と foo(void) の違いを示す例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(); | |
void caller() { | |
foo(); | |
} | |
/* コンパイルは通る */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(); | |
void caller() { | |
foo(123, "abc"); | |
} | |
/* これもコンパイルが通る */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(void); | |
void caller() { | |
foo(); | |
} | |
/* これも当然コンパイルは通る */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(void); | |
void caller() { | |
foo(123, "abc"); | |
} | |
/* これはコンパイルエラーになって通らない */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment