| im not woried about the void in my function just forgot putting that in just really want to find out how to clear my array,cant find anything on this site that has helped me so far,ive been experimenting with the following code and it achieves kinda what im looking for as long as i enter the maximum number of characters im my array.
#include <iostream.h>
int main()
{
char code[14];
cout << "Type code" << endl;
cin.getline (code,14);
cout << code << endl;
cin.ignore();
cout << "Enter another code" << endl;
cin.getline (code,14);
cout << code << endl;
return 0;
}
This program works fine as long as the full value of the array is entered i.e 13 characters |