Skip to content

Instantly share code, notes, and snippets.

@MistyBlunch
Created July 24, 2020 02:58
Show Gist options
  • Select an option

  • Save MistyBlunch/174550b27bb8df39e57baa2bc01e6314 to your computer and use it in GitHub Desktop.

Select an option

Save MistyBlunch/174550b27bb8df39e57baa2bc01e6314 to your computer and use it in GitHub Desktop.

Revisions

  1. MistyBlunch created this gist Jul 24, 2020.
    14 changes: 14 additions & 0 deletions overloading de cout
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # Ejemplooooo de aquí https://stackoverflow.com/questions/52097039/how-do-i-change-stdcout
    class print{
    public:
    int a;

    void operator<<(print &obj){
    cout<<obj.a<<endl;
    }

    };

    print obj;
    obj.a =1;
    obj<<obj;