how to struct on c++

Yes, structs are used. What you wrote is literally all that is needed, just put it in a header file. Here is a tutorial link.

structs