Passing a struct to function

if we want to pass an object to function we pass it as
returntype func(student s) //student is class and s is an object

and if i define a structure called student and want to pass one instance of it
to function then it shoould be written as

returntype func(struct student s) mentioning struct explicitly.

why cant i write it as

returntype func(student s) like i do with calsses and objects??
is it allowed???
It is allowed. I believe that explicitly writing that a type is a struct is only necessary in C if you don't typedef that struct.
In C++ classes and structs are the same thing except for the default access level.
Thanks for the reply @maeriden
Topic archived. No new replies allowed.