Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct nazwa
- {
- int a; // pole struktury
- int b; // pole struktury
- char c;
- void Init(int a, int b, char c)
- {
- this->a = a;
- this->b = b;
- this->c = c;
- }
- void DodajDoA(int b) // funckcja struktury
- {
- a += b;
- }
- void Wyswietl() // funkcja struktury
- {
- cout << "a: " << a << " b: " << b << " c: " << c << endl;
- }
- };
- int main()
- {
- nazwa n; // tworzymy nasz obiekt
- n.Init(0, 0, 'A');
- n.Wyswietl();
- while (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement