Advertisement
Josif_tepe

Untitled

Mar 20th, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. class Student{
  5. public:
  6.     string ime, prezime;
  7.     Student() {
  8.         ime = "Q";
  9.         prezime = "W";
  10.     }
  11.     Student(string i, string p) {
  12.         ime = i;
  13.         prezime = p;
  14.     }
  15. };
  16. int main() {
  17.     Student S;
  18.     S = Student();
  19.     cout << S.ime << " " << S.prezime << endl;
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement