Writing arrays with numbers and strings

Mar 17, 2011 at 12:45pm
Is there any way to write an array that can take both numbers and strings in?

Ex.
1
2
3
4
int person[1][2];

person[1][0] = "Bob";
person[1][1] = 27;


Is there any way to do that?
Thanks
Last edited on Mar 17, 2011 at 12:45pm
Mar 17, 2011 at 12:50pm
A "Structure" or "Class" would be better suited for this type of thing. This is because I assume you're trying to associate two integer properties with each person variable.
Mar 17, 2011 at 7:58pm
Ah! Thank you so much! Everything works much better now.
Topic archived. No new replies allowed.