edit: but with a buffer size of 8 you can only type a string 7 chars long. the 8th is reserved for null-termination character.Code:cin >> binary[7]; //should be cin >> binary;
edit: another question. Have you covered any loop structures. do-while, while, or for?