I have been attempting this function for the past two days and can not seem to figure it out.
void insert is called back into main with CHAR CH being inputted by the user back in main.
void insert has to record the input character into the array at INT CURRENT and shift the rest of the array elements to the right by one spot.
void insert (char text [size], int& current, char ch)
for (z=size-1; z>current; z--);
cout << "Error, insertion is not allowed" << endl;
One problem is that
size is not an argument so unless it's a global, you won't be able to use it in your if or for statements.
Topic archived. No new replies allowed.