Skip to content

Commit

Permalink
Added hello_headers.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
montehoover committed Apr 4, 2022
1 parent 0ad6215 commit c3b29a4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hello-cpp/hello-headers/hello_headers.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "mylibrary.h"

int main() {
hello();
add(2, 3);
return 0;
}
9 changes: 9 additions & 0 deletions hello-cpp/hello-headers/mylibrary.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>

void hello() {
std::cout << "hello, world" << std::endl;
}

int add(int a, int b) {
return a + b;
}
3 changes: 3 additions & 0 deletions hello-cpp/hello-headers/mylibrary.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void hello();

int add(int a, int b);

0 comments on commit c3b29a4

Please sign in to comment.