mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-18 13:14:38 +03:00
commit all code
This commit is contained in:
13
1/1.1.cpp
Normal file
13
1/1.1.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// 1.1.cpp
|
||||
// c++1x tutorial
|
||||
//
|
||||
// created by changkun at shiyanlou.com
|
||||
//
|
||||
|
||||
#include "foo.h"
|
||||
|
||||
int main() {
|
||||
add(1, 2);
|
||||
return 0;
|
||||
}
|
||||
6
1/Makefile
Normal file
6
1/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
TARGET = 1.1
|
||||
all:
|
||||
gcc -c foo.c
|
||||
g++ 1.1.cpp foo.o -o $(TARGET)
|
||||
clean:
|
||||
rm -rf *.o $(TARGET)
|
||||
13
1/foo.c
Normal file
13
1/foo.c
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// foo.c
|
||||
// c++1x tutorial
|
||||
//
|
||||
// created by changkun at shiyanlou.com
|
||||
//
|
||||
|
||||
|
||||
#include "foo.h"
|
||||
|
||||
int add(int x, int y) {
|
||||
return x+y;
|
||||
}
|
||||
Reference in New Issue
Block a user