Last active
November 18, 2018 06:32
-
-
Save cwshu/e0d3cd4f0c618b43af753341b79f0910 to your computer and use it in GitHub Desktop.
arduino....
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(int a, int b) | |
{ | |
return a+b; | |
} |
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
#ifdef __cplusplus | |
extern "C" { | |
#endif // __cplusplus | |
int foo(int a, int b); | |
#ifdef __cplusplus | |
} // extern "C" | |
#endif // __cplusplus | |
#ifdef __cplusplus | |
int foo(int a, int b = 10); | |
#endif // __cplusplus |
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
#include <cstdio> | |
#include "foo.h" | |
int main(int argc, char *argv[]){ | |
printf("%d, %d\n", foo(1, 2), foo(20)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment