DEV Community

Discussion on: C++ Array List

Collapse
 
mitjmcc profile image
Mitch McClellan

It looks like you're trying to add a string and an int, when C++ does not automatically cast the int like say C# does.

Following this, you just need to change

cout << "Eldest Age is = " + eldestAge << endl;

to

cout << "Eldest Age is = " << eldestAge << endl;
Collapse
 
crhodes2 profile image
crhodes • Edited

Oh wow! Such stupid mistake I've made, lol! Thanks!
Now could you give me any ideas as to why the largest number is not displaying? What am I doing wrong? :/
Edit: Nevermind! Solved it!