Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


full solution available on attachment

I use structures only when I need to hold some data without any member functions associated to it (to operate on the member data) and to access the data variables directly.

For example:

1. Reading/Writing data from files and socket streams etc.

2. Passing function arguments in a structure where the function arguments are too many and function syntax looks too lengthy.

Technically there is no big difference between classes and strutures except default accessibility. More over it depends on programming style how we use it.



 

Views: 875

Attachments:

Replies to This Discussion

Bhai Jan Yeh Attachment To MTH202 Discrete Mathematics Ke GDB Ka Sirf Sawal Hai.

Dimaghi Tor Par Out Hein Kia?

Sahih File Attach Karein.

@ Shafiq File to sahi hai sheyd app nay thek say dekha nahi
The only difference between a classes and a structures in C++ is that structures have default public members and bases and classes have default private members and bases. Both classes and structures can have a mixture of public and private members, can use inheritance, and can have member functions.
I would recommend using structures as plain-old-data structures without any class-like features, and using classes as aggregate data structures with private data and member functions.
shafiq nice sharing

You are welcome.

Thank you.

dear friend ye cs201 ka group hy

Mein Bhi Yehi Samjhane Ki Koshish Kar Raha Hon.

Wesay Meinay Idea Solution De Dia Hai?

Yes Dear this is cs201 group

I use structures only when I need to hold some data without any member functions associated to it (to operate on the member data) and to access the data variables directly.

For example:

1. Reading/Writing data from files and socket streams etc.

2. Passing function arguments in a structure where the function arguments are too many and function syntax looks too lengthy.

Technically there is no big difference between classes and strutures except default accessibility. More over it depends on programming style how we use it.

Thanks M.Shafiq for idea solution.
Thnx Shafiq
This is good idea solution.keep it up

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service