Struct vs Classes

0 Rehman . · July 31, 2015
I got a simple question what's the difference between these two and where they are suitable?
like if we simply ignore structures can we still live ?

Post a Reply

Replies

Oldest  Newest  Rating
0 Branislav Lazic · July 31, 2015

like if we simply ignore structures can we still live ?


Yes.
+1 Franz Schmidt · July 31, 2015
Structs are only a compilation of various variables but classes are way more powerful, e.g. you can make function which are only useable by specific classes and just inside those function you can use the private variables of a class and so on....

And structs can be very usefull sometimes if you want to orginise variables which have logical connection and so you will get a well 'structed" programm.
  • 1

General Chat

107,041 followers
About

Chat about anything non-computer related including, music, movies, tuna sandwiches, and more!

Links
Moderators
Bucky Roberts Administrator