+ 1

How define a data structure? :(((((

I am trying to build a data structure similar to: person{ int ID; char first name; char last name; } please help me :(

24th Nov 2017, 1:43 AM
Hosein Jandaghi
Hosein Jandaghi - avatar
2 odpowiedzi
+ 1
when building a data structure you have to remember that classes have: 1. constructors to initialize object, copy it to another object etc. 2. private properties, stuff that cannot be accessible from the outside of that class just by calling them. 3. methods that either are set/get functions or more complex functions that perform actions on our private data 4. destructors to destroy the class properly when the programming finishes running
24th Nov 2017, 4:57 AM
Dmitrii
Dmitrii - avatar
+ 1
structs(C) are a bit simpler than that but similar still
24th Nov 2017, 4:58 AM
Dmitrii
Dmitrii - avatar