Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
why
#include <iostream> #include <set> using namespace std; set<string> stringSet; struct StringStruct { string str; }; void referencePass(StringStruct & str) { stringSet.insert(str.str); } void insertIntoGlobal() { for (int i = 0; i < 2; i ++) { string asdf; cin >> asdf; StringStruct a = {asdf}; referencePass(a); } } int main() { insertIntoGlobal(); for (auto itr : stringSet) { cout << itr << endl; } return 0; }
run
|
edit
|
history
|
help
0
Dat pointers
template specialization inheritance problem
bank queue
Dash-D compiler flag example
for_each_argument
Balanced Insert Example
Делим на Ноль
mddd
Throttle Example (Send two requests every two seconds)
specialized template