Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- struct Ziomek
- {
- std::string
- imie,
- nazwisko,
- haslo;
- friend std::ostream& operator<<(std::ostream& wyjscie, Ziomek& ziom)
- {
- wyjscie << "\nImie: " << ziom.imie;
- wyjscie << "\nNazwisko: " << ziom.nazwisko;
- wyjscie << "\nPasswd: " << ziom.haslo;
- return wyjscie;
- }
- friend std::istream& operator>>(std::istream& wejscie, Ziomek& ziom)
- {
- wejscie >> ziom.imie;
- wejscie >> ziom.nazwisko;
- wejscie >> ziom.haslo;
- return wejscie;
- }
- };
- int main()
- {
- Ziomek spizganyZiom;
- std::cout << "Podaj [imie] [nazwisko] [haslo]: ";
- std::cin >> spizganyZiom;
- std::cout << "\nPodales:";
- std::cout << spizganyZiom;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement