asiavoices
Programmer
Hello all,
I was wondering how I could define a multi-dimensional Vector or array that has different variable types? Similar to a Structure in C?
And how I could access the elements via indexing?
For example:
1. I'd like to enter an items' ID (int), description (string), price (float?) and taxable-state (boolean)
2. User's enter the info and its loaded in the Vector/Array. How is this done?
3. After all items have been entered, how do loop to display the Vector or array and their elements?
I understand that the size of an array cannot be changed so I would guess that Vector would be the best solution, correct? (For the user to keep adding the data)
thanks all,
Christopher
I was wondering how I could define a multi-dimensional Vector or array that has different variable types? Similar to a Structure in C?
And how I could access the elements via indexing?
For example:
1. I'd like to enter an items' ID (int), description (string), price (float?) and taxable-state (boolean)
2. User's enter the info and its loaded in the Vector/Array. How is this done?
3. After all items have been entered, how do loop to display the Vector or array and their elements?
I understand that the size of an array cannot be changed so I would guess that Vector would be the best solution, correct? (For the user to keep adding the data)
thanks all,
Christopher