Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

homo.cpp: Revision history

From Randomness wiki

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

15 September 2024

  • curprev 06:3506:35, 15 September 2024Derg talk contribs 482 bytes +482 Created page with " <syntaxhighlight lang="C++"> #include <iostream> #include <string> class Homo { private: public: std::string key; void operator= (std::string index) { std::cout << this->key << " is " << index << std::endl; } }; class Gay { private: public: Homo operator[] (std::string index) { Homo h; h.key = index; return h; } }; int main() { Gay gay; gay["your mom"] = "gay"; return 0; } </syntaxhig..."