With file is everything ok. For me fscanf is curious, i dont get the result it gives.
Type: Posts; User: tenibag
With file is everything ok. For me fscanf is curious, i dont get the result it gives.
Already done that for fscanf. Result is pretty interesting. In place of ints from (0,0),(2,0),(3,3),(0,2) I have 12665 in 2nd line is false result from if.
How to check return value of fopen ?
Command system("chcp 1250") is for Polish chars in console. I added it on Windows, but it didnt make any difference.
Any thoughts what is with this miserable fscanf? ;<
There are no errors. I can compile the code but after this, program simply doesn't work. Function fscanf loads strange values.
#include <stdio.h>
#include <math.h>
//po podaniu...
Hi. I wrote some code like this:
FILE * plik;
plik = fopen("plik.in", "r");
fscanf(plik, "(%d,%d),(%d,%d),(%d,%d),(%d,%d)", &ax,&ay,&bx,&by,&cx,&cy,&dx,&dy);
fclose(plik);