David Blume's GitList
Repositories
testcode.git
Code
Commits
Branches
Tags
Search
Tree:
eee2554
Branches
Tags
c++11
main
start
testcode.git
my_lib
my_lib.cpp
Have cscope ignore symbolic links.
David Blume
commited
eee2554
at 2017-12-30 14:10:49
my_lib.cpp
Blame
History
Raw
#include <iostream> #include "../include/my_lib.hpp" using namespace std; namespace { int my_lib_helper_fn(int x) { cout << "The function " << __func__ << " with parameter " << x << " was called." << endl; return x + 1; } } namespace MY_LIB { my_lib_rect::my_lib_rect(int width, int height): width_(width), height_(height) {} int my_lib_rect::area() const { return width_ * height_; } int my_lib_fn() { cout << "The function " << __func__ << " was called." << endl; return 0; } int my_lib_fn(int x) { int a = my_lib_helper_fn(x); cout << "The function " << __PRETTY_FUNCTION__ << " with parameter " << x << " was called." << endl; return x + a; } }