Thanks buddy , but I could use int and return an int like " age " , right ?
also why wouldn't work and gives me this error " binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) " when I change the array from char[] to string ? even though I declared using namespace std; before the struct. ?
If you return an int such as age then you can use int k.
I think you get that error when you change to string because you didn't add #include <string> at the beginning of the code after #include <iostream> . Try adding it and then tell me what happens.