|
|
cout << name << "'s car make is " << make << "of year " << year << " and is " << color << ".\n";
|
|
Subzero030201 (25) Mar 7, 2012 at 7:20pm Hope this helps. |
struct info *list = new struct info[owners];
|
|
|
|
|
|
|
|
here is my editted code! but it's still not working out! D: does anyone see a mistake?? |
|
|
|
|
Valid indexes for arrays are 0 to size-1. |
|
|
cire, what do you mean by 0 to size - 1? i have 3 variables so wouldnt it be 0, 1, 2? |
string info [2][2];
and, how would i put data into info? |
cire (231) Mar 8, 2012 at 11:25pm cire, what do you mean by 0 to size - 1? i have 3 variables so wouldnt it be 0, 1, 2? string info [2][2]; I quoted your code for a reason. You don't have room for 3. So size is 2, and 0 to size-1 is 0 to 1. and, how would i put data into info? The same way you put data into other variables. |
|
|
magadavixt wrote: |
---|
gahh. i am at a lost on how to insert data into arrays |
|
|
Please enter the third string: a bunch of stuff string number 1: first string number 2: second string number 3: a bunch of stuff Press ENTER to continue ... |
|
|
Please enter string number 1 of array number 1 first string Please enter string number 2 of array number 1 hello Please enter string number 3 of array number 1 OK Please enter string number 1 of array number 2 how many more do I have to enter? Please enter string number 2 of array number 2 that didn't answer my question' Please enter string number 3 of array number 2 fine then :p User entered 'first string' for string number 1 of array number 1 User entered 'hello' for string number 2 of array number 1 User entered 'OK' for string number 3 of array number 1 User entered 'how many more do I have to enter?' for string number 1 of array number 2 User entered 'that didn't answer my question'' for string number 2 of array number 2 User entered 'fine then :p' for string number 3 of array number 2 Press ENTER to continue ... |
|
|
|
|