The only difference between struct's and classes in c++ are structs members are public while classes are private in the default context scope. Some people avoid the use of functions in struct's to avoid this kind of confusion and maintain consistency.
actually i was going through a question which was a multiple choice in which a single statement was true,in that the true statement was "Structures cannot have members as functions" so i got bit confused