Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- // funkcja zwracająca więcej niż jedną wartość
- struct Wynik
- {
- int liczba;
- string nazwa;
- };
- Wynik funkcja()
- {
- Wynik wynik;
- wynik.liczba = 20;
- wynik.nazwa = "wynik";
- return wynik;
- }
- void funkcja(int& wynik_liczba, string& wynik_nazwa)
- {
- }
- int main()
- {
- Wynik wynik = funkcja();
- cout << wynik.liczba << '\t' << wynik.nazwa << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment