Small suggestion to the mid section quiz question about structs

Hi,

I’ve noticed small thing in mid section quiz. In the question:

When would you use a structure instead of a class?

The correct answer is:

For simple data types, typically with no functions and public data.

This is a bit misleading because one of the major differences between struct and class is that sturcts have everything public by default. So when somebody is using struct it typically has data that is only public.

1 Like

Hello @Sygan,

you quoted:

The correct answer is:

For simple data types, typically with no functions and public data.

So, the fact that every data within a struct is public is contained in the answer of the question.

I don’t see any problems?

Kind regards
Kevin

Perhaps a comma is necessary haha

For simple data types, typically with no functions, and public data.

It currently reads ‘no functions or public data’

I think that is what Sygan is referring to?

Privacy & Terms