i'm trying to do this one exercise in a book where it asks you to replace user input of blanks tabs and backspaces with the words "blanks" "tabs" and "backspaces. but somehow this printf wont compile...
Code:
#include <stdio.h>
#define IN 1
#define OUT 0
int main(void)
{
int c, state;
state = OUT;
while((c = getchar()) != EOF){
putchar(c);
if(c == ' ')
printf("blankz");
if(c == '\t')
printf("tabz);
if(c == '\b')
printf("backspacez");
}
}
the error is in printf("backspacez"); and it says the "tabz" printf has an error too but NOT the printf("blankz"); for some reason...
Error message:
cpp:20:unterminated string or character constant
cpp:18ossible real start of unterminated constant
i meant to say 18 colon but it makes that face lol. o and im using
C-Free 3.5