diff --git a/ch1/Makefile b/ch1/Makefile new file mode 100644 index 0000000..66b434d --- /dev/null +++ b/ch1/Makefile @@ -0,0 +1,19 @@ +CPP = g++-4.8 +CPPFLAGS = -g -std=c++0x +OFLAG = -o +.SUFFIXES : .o .cpp .c +.cpp.o : + $(CPP) $(CPPFLAGS) -c $< +.c.o : + $(CPP) $(CPPFLAGS) -c $< + +PROGS = hello + +all: $(PROGS) + +hello: hello.o + $(CPP) $(OFLAG) hello hello.o + +clean: + rm -f ${PROGS} *.o + diff --git a/ch1/hello.cpp b/ch1/hello.cpp new file mode 100644 index 0000000..50378c1 --- /dev/null +++ b/ch1/hello.cpp @@ -0,0 +1,18 @@ +#include +#include + +void hello() +{ + std::cout << "Hello Concurrent World\n"; +} + +int main() +{ + //boost::thread t([]() + std::thread t([]() + { + std::cout << "Hello Concurrent World\n"; + }); + + t.join(); +}