char option;
FILE *fp;
errno_t err;
err = fopen_s(&fp, "../AVL Trees/input.txt", "r");
while (!feof(fp))
{
fscanf_s(fp, "%c", &option); //error is here
...
}
이것은 AVL Trees 프로젝트 용입니다. 왜이 오류가 발생했는지 이해할 수 없습니다. "형식에 대해 인수가 충분하지 않습니다.", 뭔가 놓쳤습니까?Visual Studio를 사용하는 동안 오류가 발생했습니다. 2017 : fscanf_s
편집 : C 표준에서
1>e:\visual studio projects\avl trees\avl trees\main.cpp(27): warning C4473: 'fscanf_s' : not enough arguments passed for format string
1>e:\visual studio projects\avl trees\avl trees\main.cpp(27): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
1>e:\visual studio projects\avl trees\avl trees\main.cpp(27): note: the missing variadic argument 2 is required by format string '%c'
1>e:\visual studio projects\avl trees\avl trees\main.cpp(27): note: this argument is used as a buffer size
같은 호출을 사용한다 변수 옵션이 선언 되었습니까? –
많은 도움이되지는 않겠지 만, 여기에 (편집 된) – Gundal
다른 문제는 현재 문제와 관련이 없습니다. (그러나 다음 문제에 도움이 될 수 있습니다.) 왜 "while (! feof (file)" 항상 잘못 되었습니까?] (https://stackoverflow.com/questions/5431941/why-is-while-feof-file-always-wrong) – user4581301