[ create a new paste ] login | about

Link: http://codepad.org/RuowrI5x    [ raw code | fork ]

C++, pasted on Dec 10:
#include <iostream>
using namespace std;

struct Cliente{
    string nombre;
};

Cliente funcion1 (Cliente c){
    cout << "nombre para el cliente: ";
    cin >> c.nombre;
    return c;
}

void funcion2 (Cliente c){
    cout << "El nombre del cliente es: " << c.nombre << endl;
}


int main (){
    Cliente cliente;
    
    cliente = funcion1(cliente);
    
    funcion2(cliente);
    
    cin.ignore();
    return 0;
}


Create a new paste based on this one


Comments: