Rev | Line | |
---|
[10] | 1 | #include <iostream> |
---|
| 2 | #include "stopos_key.h" |
---|
| 3 | // g++ teststopos_key.cpp ../trunk.stopos_key.cpp -I ../trunk |
---|
| 4 | |
---|
| 5 | void doit(int n) |
---|
| 6 | { |
---|
| 7 | stopos_key b; |
---|
| 8 | b.set(n); |
---|
| 9 | std::cout << n << " " << b.str() << std::endl; |
---|
| 10 | } |
---|
| 11 | int main() |
---|
| 12 | { |
---|
| 13 | |
---|
| 14 | stopos_key a; |
---|
| 15 | std::cout << a.str() << std::endl; |
---|
| 16 | std::cout << stopos_key().str() << std::endl; |
---|
| 17 | |
---|
| 18 | std::string s; |
---|
| 19 | s = a.str(); |
---|
| 20 | s[0] = '2'; |
---|
| 21 | std::cout<<a.str()<<":"<<s<<std::endl; |
---|
| 22 | |
---|
| 23 | for (int i=0; i<1000; i++) |
---|
| 24 | doit(i); |
---|
| 25 | |
---|
| 26 | return 0; |
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.