From c3b29a4d142050f524aec59fb229912ba77629f2 Mon Sep 17 00:00:00 2001 From: Monte Hoover Date: Mon, 4 Apr 2022 15:33:15 -0400 Subject: [PATCH] Added hello_headers.cpp --- hello-cpp/hello-headers/hello_headers.cpp | 7 +++++++ hello-cpp/hello-headers/mylibrary.cpp | 9 +++++++++ hello-cpp/hello-headers/mylibrary.h | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 hello-cpp/hello-headers/hello_headers.cpp create mode 100644 hello-cpp/hello-headers/mylibrary.cpp create mode 100644 hello-cpp/hello-headers/mylibrary.h diff --git a/hello-cpp/hello-headers/hello_headers.cpp b/hello-cpp/hello-headers/hello_headers.cpp new file mode 100644 index 0000000..d26d354 --- /dev/null +++ b/hello-cpp/hello-headers/hello_headers.cpp @@ -0,0 +1,7 @@ +#include "mylibrary.h" + +int main() { + hello(); + add(2, 3); + return 0; +} \ No newline at end of file diff --git a/hello-cpp/hello-headers/mylibrary.cpp b/hello-cpp/hello-headers/mylibrary.cpp new file mode 100644 index 0000000..a4a2114 --- /dev/null +++ b/hello-cpp/hello-headers/mylibrary.cpp @@ -0,0 +1,9 @@ +#include + +void hello() { + std::cout << "hello, world" << std::endl; +} + +int add(int a, int b) { + return a + b; +} \ No newline at end of file diff --git a/hello-cpp/hello-headers/mylibrary.h b/hello-cpp/hello-headers/mylibrary.h new file mode 100644 index 0000000..09d0e83 --- /dev/null +++ b/hello-cpp/hello-headers/mylibrary.h @@ -0,0 +1,3 @@ +void hello(); + +int add(int a, int b); \ No newline at end of file