Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
namespace name resolution
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 #include <iostream> #include <string> class Admin { public: Admin(const char* a ): descp(a){} operator std::string () const { return descp; } private: std::string descp; }; class Test { public: static Admin adm; static void print_admin( const Admin& admin ) { std::cout << std::string(admin) <<std::endl; } }; Admin Test::adm("QiuWen"); namespace M { int k = 2; namespace N{ int k = 3; extern int m; void print() { std::cout << "k = " << k << std::endl; std::cout << "m = " << m << std::endl; } }} int k = 1; int M::N::m = k; int main() { M::N::print(); return 0; }
run
|
edit
|
history
|
help
0
Struct packing
hangman
Copy double[2][3] into vector<vector<double>>
Dices by GOOSE
dharm1
hangman
Ελλάδα !!!!
ambiguity does not count as ambiguity
#30.1
Wide string conversion with multibyte chars and locale + concatenation