This function returns the position of line where '\' appear. I tried '\' it woudln't compile i go to the ascii table and found out \ = 0x3c. but instead it's actually 60 soooooooo what now lol
1 2 3 4 5 6 7 8 9 10 11 12
int check_slash(char *lines){
unsignedint counter = 0;
unsignedint one_check = 0;
for (int i = 0; i <= (length(lines)-1); i++){
if ((lines[i] == 0x3c) & (one_check == 0)){
counter = i;
one_check++;
}
}
return counter;
}
The reason it probably didn't compile is that the backslash is used for escape sequences so you must use the escape sequence then another backslash to tell the compiler it is a backslash.