char * line = NULL;
size_t len = 0;
FILE *fp = fopen("test.rpn", "r");
while ((read = getline(&line, &len, fp)) != -1) {
if(&line[0] == "#"){
exit(0);
}
}
This doesn't work, the first character of a line is # and yet it is not exiting. I have also tried 0/1/2/3/4 just to see if it was so weird start of line issue but it is not.