c900f0ab4e4cc0f9fd92f859d1658332c2c411d1
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) 
David Blume Have cscope ignore symbolic...

David Blume authored 6 years ago

15) namespace MY_LIB {
16) 
David Blume Make ctags and cscope more...

David Blume authored 6 years ago

17) my_lib_rect::my_lib_rect(int width, int height):
18)   width_(width),
19)   height_(height)
20) {}
21) 
22) int my_lib_rect::area() const
23) {
David Blume Added some documentation fo...

David Blume authored 3 years ago

24)     return width_ * height_;
David Blume Make ctags and cscope more...

David Blume authored 6 years ago

25) }
26) 
David Blume first commit

David Blume authored 8 years ago

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

David Blume authored 8 years ago

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

David Blume authored 8 years ago

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

David Blume authored 6 years ago

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

David Blume authored 8 years ago

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

David Blume authored 6 years ago

35)     return x + a;
David Blume first commit

David Blume authored 8 years ago

36) }