123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include <stdio.h>
- #include "sample4.h"
- int Counter::Increment() {
- return counter_++;
- }
- int Counter::Decrement() {
- if (counter_ == 0) {
- return counter_;
- } else {
- return counter_--;
- }
- }
- void Counter::Print() const {
- printf("%d", counter_);
- }
|