David Blume's GitList
Repositories
testcode.git
Code
Commits
Branches
Tags
Search
Tree:
56e9725
Branches
Tags
c++11
main
start
testcode.git
my_lib
my_lib.cpp
Add .clang-format
dblume
commited
56e9725
at 2023-08-12 23:24:26
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 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; } } // namespace MY_LIB