Advertisement
Josif_tepe

Untitled

Apr 29th, 2025
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Ucenik {
  5. private:
  6.     char * ime;
  7.     float prosek;
  8.     int godini;
  9.  
  10. public:
  11.     Ucenik() {}
  12.     Ucenik(char * _ime, float _prosek, int _godini) {
  13.         prosek = _prosek;
  14.         godini = _godini;
  15.         ime = new char[strlen(_ime)];
  16.         strcpy(ime, _ime);
  17.     }
  18.     Ucenik(const Ucenik & tmp) {
  19.         prosek = tmp.prosek;
  20.         godini = tmp.godini;
  21.         ime = new char[strlen(tmp.ime)];
  22.         strcpy(ime, tmp.ime);
  23.     }
  24.    
  25. };
  26. int main() {
  27.     return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement