I want to pass user input directly to function without variable. Now I am doing this:
int temp, len; cin >> len; for (int i = 0; i < len; i++){ cin >> temp; foo(temp); }
Can I do it without temp? Maybe I should not use "cin"?
Aucun commentaire:
Enregistrer un commentaire