I'm new to arrays, can anyone help explain my fault... Other than my lack of knowledge
I declare an array of strings:
then I try to set an element of the array determined by the value of a variable ->count to equal another variable -> partnerId.Code:char stations [20] [11];
Every things seems to work fine, but my output on screen is nothing but garble. Can someone tell me what I am doing wrong?Code://determine recType and populate array if necessary if (recType == 'p' || recType == 'P') { count = stationId; //set count equal to stationId stations [count]== partnerId; //set element equal to partnerId cout <<stations[count]<<endl; //display the element just set }
thanks as always for the help-