So right now I'm working on a C++ prototype of a program that I want to create. And I have a question about multi-dimensional arrays. I know that you can make a string array by using string stringname[first dimension ][second dimension]; and an integer by the same thing but is there anyway to combine the two and have say one row represent a string and a second row represent an integer? Right now I'm using two separate arrays but, it looks kind of messy right now so I was wondering if there was anyway that i could clean it up. Thanks for your help
You cant combine an integer and a char array in c++. The problem with that is in char array,1 byte is malloc to that variable. While in an interger 4 byte in malloc in case of int and 8 byte in case of double. So one thing you can do is to make a class and make derivative of the class one int and other char[max length]. If you need further assistance i can provide you a code to understand better or i can make your code for free.