+ 2
C++ Array
Can i store string, char and intigers in same array? If i can then how?it's confusing me. Please help me to get out of this.
3 Réponses
+ 2
No, since arr type is declared first so only one type data can be stored
+ 1
u can use struct/class/tuple
0
No you can't. This is because the array type is declared at the starting and you can declare the array as only one type.
You can learn more in this tutorial https://www.tutorialspoint.com/cplusplus/cpp_arrays.htm