Hi
I am making a small program of students, where the user inputs the students details as age,class,name and address.
I am making a structure for the student and wanted to know that if we make a structure using strings as:
Do we have to define the variables of these data members using "string" or we can even define their variables using "char"?Code:string student_name; string student_address; string student_age;
Also do we initialize the data members using :
I mean in these curly brackets do we simply enter the data members or we have to mention the exact name,address and age of the student?Code:student ={"student_name","student_address", "student_age"};
Also before making struct for student do we also have to enter the pre processor for string as:I hope I am clearCode:# include<string>



LinkBack URL
About LinkBacks



