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
Graphs Iteration1 Undirected.
Dynamic call
selection sort
set/map equal_range bug in libc++
hw 1 os
test
Example
vf
back_inserter example
Result of not joining thread in main()