Hello,
I defined a list in a class and want to do a class containing get/set functions. How can I set or get a data struct (list element) that has variables of different type and each variable is taken separably as an input from the user (I do the input part in the main function, right?)
Thanks
kaydee123 0 Newbie Poster
Recommended Answers
Jump to PostI'm not sure if this is to what you are referring but a struct can have a constructor just like a class does (the only difference between the two is the default access of the variables, struct everything is public by default and class everything is private):
All 2 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.