mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
fajne rzeczy
This commit is contained in:
14
uczelnia/2_semestr/programowanie/laby/lab3/zad1.cpp
Normal file
14
uczelnia/2_semestr/programowanie/laby/lab3/zad1.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <iostream>
|
||||
|
||||
class Student {
|
||||
private:
|
||||
std::string imie; // pole prywatne
|
||||
int nrAlbumu; // pole prywatne
|
||||
|
||||
public:
|
||||
Student(std::string imie, int nrAlbumu)
|
||||
: imie(imie), nrAlbumu(nrAlbumu) {} // konstruktor
|
||||
void pokaz() { // publiczna metoda
|
||||
std::cout << imie << " " << nrAlbumu << std::endl;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user