diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Hello.c | 6 | ||||
| -rw-r--r-- | src/Hello.h | 14 | ||||
| -rw-r--r-- | src/Main.cpp | 8 |
3 files changed, 28 insertions, 0 deletions
diff --git a/src/Hello.c b/src/Hello.c new file mode 100644 index 0000000..7cd1d70 --- /dev/null +++ b/src/Hello.c @@ -0,0 +1,6 @@ +#include "Hello.h" +#include <stdio.h> + +void printMessage(const char* message) { + printf("%s", message); +} diff --git a/src/Hello.h b/src/Hello.h new file mode 100644 index 0000000..1ec1f96 --- /dev/null +++ b/src/Hello.h @@ -0,0 +1,14 @@ +#ifndef SRC_HELLO_H_ +#define SRC_HELLO_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +void printMessage(const char* message); + +#ifdef __cplusplus +} +#endif + +#endif /* SRC_HELLO_H_ */ diff --git a/src/Main.cpp b/src/Main.cpp new file mode 100644 index 0000000..3348d2a --- /dev/null +++ b/src/Main.cpp @@ -0,0 +1,8 @@ +#include <cstdlib> + +#include "Hello.h" + +int main(){ + printMessage("Hello world\n"); + return EXIT_SUCCESS; +} |
