Skip to content

Commit

Permalink
Make struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-stepien-dev committed Jan 26, 2023
1 parent 002e1a7 commit 394a748
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion 04.01.23 Assigments/Ex.3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,36 @@

using namespace std;

int main()
#define CONSOLE(x) cout << x << endl;

struct Person
{
void set_first_name(char * letter)
{
*first_name = *letter;
}
char get_first_name()
{
return *first_name;
}
private:
char * first_name;
char last_name[30];
short age;
char pesel[30];
public:

};

int main()
{
CONSOLE("Working");

Person person1;
const short year = 2023;
char first_name = 'A';
cout << person1.get_first_name() << endl;
person1.set_first_name(&first_name);
CONSOLE(person1.get_first_name());
return 0;
}

0 comments on commit 394a748

Please sign in to comment.