Quick actions

cmd+k|ctrl+k

Navigation

Languages

i/o

Snippet info

Language

Cpp

Visibility

public

Author

danielmg17

Created

2018-02-08T20:02:57Z

Updated

2018-02-12T15:37:15Z

#include <iostream>
using namespace std;

void foo(int& x) {//nothing to do with I/O, just references practice
    x = 5;
}

typedef struct {
    string first;
    string last;
    int age;
} Iden;

int main() {
    string first, last;
    cout << "What is your name? ";
    cin >> first >> last;
    cout << last << ", " << first;
    cerr << "wait";
    cout << endl << "Do I appear or shall I disappear?";
    int y = 0;
    foo(y);
    cout << endl << y;
    Iden one;
    one.first = first; one.last = last;
    cout << endl << one.first << " " << one.last;
}
INFO