I am writing a sudoku-type game, and I want to have a random generator call a game from a list of saved games. Should I use a struct, a class, or something else?
struct and class is the same thing. Only difference is that with class the default is private and with struct the default is public.
The only difference between a
struct and a
class, is the default access level. A
struct's default access level is
public, while the latter's is
In that case, I will use a struct.
Thanks for responding!
I thought that struct couldn't have member functions?
Huh, I never knew that!
I thought structs were a C thing and classes were a C++ thing. Are there really other differences between them?
I'm guessing you can't use inheritance with structs, but I'm probably wrong there too.