Sha256: 08d0588c0fe83b866117e5b98100ffa9aa9abe13b14acde96c80a8641aee9668
Contents?: true
Size: 970 Bytes
Versions: 1
Compression:
Stored size: 970 Bytes
Contents
#ifndef __DEFAULT_ARGS_H__ #define __DEFAULT_ARGS_H__ #include <string> #include <iostream> using namespace std; namespace default_args { // Global functions int global_do(int x, int y = 3, int z = 10) { return x * y * z; } // Module functions int module_do(int x, int y = 3, int z = 10) { return x + y + z; } class Tester { public: Tester() { } // Class methods std::string concat(std::string value1, std::string value2, const char* with = "-") { return value1 + std::string(with) + value2; } // Class static methods static std::string build(std::string base, int times = 3) { std::string out = ""; for(int i = 0; i < times; i++) { out += base; } return out; } }; class Directed { public: // Director methods virtual int virtualDo(int x, int y = 10) { return x * y; } }; } #endif // __DEFAULT_ARGS_H__
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rbplusplus-0.9 | test/headers/default_arguments.h |