Hi,
Hope you can help. The following is essentially a small problem of an overall project, i have been trying to work out how to divide an inputted string, into say blocks of 4 characters and then output these separate blocks on the screen. e.g. 1234567891234567 ----> 1234 5678 9123 4567and so on. here's wat i have so far it seem to be working prob.
i think i must cout<<" " ?
thanks,
hay_man
int strLength = str.length()-1;
int x= 0;
while (x<strLength)
{
int j=0;
while (j < 4){
newString[j] = str[x];
cout<< newString[j];
j++;
}
x++;
}