Can anyone find anything immediately wrong with this code? I have two problems
1) It isn't copying properly, it gets hung up on some c's
2) When I run the program it gets caught in a loop I think because it won't end.
char outorin[7];
while (!input.eof()){
input.get(c);
if (c == 'c'){
input.getline(outorin, 7);
if (0 == strcmp(outorin, "out >>")){
output << "cout <<";
}
if (0 == strcmp(outorin, "in << ")){
output << "cin >> ";
}
else{
input.seekg(-6,ios::cur);
}
}
output << c;
if (input.eof()){
break;
}
}