Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Tab indentation
- namespace ns
- {
- class A
- {
- public:
- A();
- ~A();
- const std::string& format(int foo, const std::vector<std::string>& bar) const;
- private:
- int v_;
- bool w_;
- void do_stuff();
- }; // A
- struct B
- {
- B();
- int v;
- bool w;
- }; // B
- int foo()
- {
- }
- } // end namespace ns
- const char* bar(bool bat)
- {
- if(bat) {
- bag();
- } else {
- bam();
- }
- const char* res = NULL;
- switch(foo()) {
- case 1:
- res = "1";
- break;
- default:
- res = "0";
- }
- while(*res) {
- ++res;
- }
- res = "42";
- do {
- ++res;
- } while(*res);
- for(unsigned i = 0; i < 42; ++i) {
- *res = 0;
- }
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment