David Blume's GitList
Repositories
testcode.git
Code
Commits
Branches
Tags
Search
Tree:
c900f0a
Branches
Tags
c++11
main
start
testcode.git
my_lib
my_lib.cpp
Added some documentation for the IDEs.
David Blume
commited
c900f0a
at 2021-09-26 17:43:16
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; } }