de73d206a8a4817be0209b65f795af5b40196ca2
David Blume first commit

David Blume authored 8 years ago

1) #include <iostream>
2) #include "../include/my_lib.hpp"
3) 
4) using namespace std;
5) 
David Blume Make ctags and cscope more...

David Blume authored 6 years ago

6) namespace {
7) 
8)   int my_lib_helper_fn(int x) {
9)     cout << "The function " << __func__ << " with parameter " << x << " was called." << endl;
10)     return x + 1;
11)   }
12) 
13) }
14) 
15) my_lib_rect::my_lib_rect(int width, int height):
16)   width_(width),
17)   height_(height)
18) {}
19) 
20) int my_lib_rect::area() const
21) {
22) 	return width_ * height_;
23) }
24) 
David Blume first commit

David Blume authored 8 years ago

25) int my_lib_fn() {
David Blume Use __PRETTY_FUNCTION__ and...

David Blume authored 8 years ago

26)     cout << "The function " << __func__ << " was called." << endl;
David Blume first commit

David Blume authored 8 years ago

27)     return 0;
28) }
29) 
30) int my_lib_fn(int x) {
David Blume Make ctags and cscope more...

David Blume authored 6 years ago

31)     int a = my_lib_helper_fn(x);
David Blume Use __PRETTY_FUNCTION__ and...

David Blume authored 8 years ago

32)     cout << "The function " << __PRETTY_FUNCTION__ << " with parameter " << x << " was called." << endl;
David Blume Make ctags and cscope more...

David Blume authored 6 years ago

33)     return x + a;