I keep getting segmentation fault when the program gets to
This is in another constructor, I have included the code and the output below, Please let me know if you know why I get segmentation fault when I use c[i] = c[i + 1]
Account test(" test");
balance = 0;
int i = 0;
//while loop removes the spaces in front of the string.
while (c[i] == ' ' || c[i] == '\t' || c[i] == '\n')
c[i] = c[i + 1];