C++ Library
- Linux
- g++ 6.3.0
- cmake 2.8.2
- Clone
$ git clone https://github.com/zy2625/CppLib.git-
Build
- Samples only:
$ mkdir build && cd build $ cmake .. $ make
- Additional tests:
$ mkdir build && cd build $ cmake -DCPPLIB_BUILD_TEST=ON .. $ make
-
Run
- targets:
- specific target
$ cd .. && ./bin/Stack ./data/tobe.txt
- custom target
$ make run
- tests:
- detailed output
$ cd .. && ./bin/Test
- test summary
$ make test
- targets:
$ more data/tobe.txt
to be or not to - be - - that - - - is
./bin/Deque data/tobe.txt
As queue: to be or not to be (2 left on deque)
As stack: to be not that or be (2 left on deque)
$ more data/tobe.txt
to be or not to - be - - that - - - is
./bin/Queue data/tobe.txt
to be or not to be (2 left on queue)
$ more data/tobe.txt
to be or not to - be - - that - - - is
./bin/Stack data/tobe.txt
to be or not to be (2 left on stack)
./bin/Timer
Timestamp: 1499677940528
Timestamp: 1499677941023
It takes 0.495s to sum the sqrt 100000000 times