I am using nullptr
becuase it is handy and makes my code more readable. But the compiler gives me error below.
My question is what header file must be included in order to resolve the problem.
Here a piece of code:
FILE *fptr;
fptr=fopen("E:\\text.txt","w");
if(fptr==nullptr)
{
perror("open()");
return EXIT_FAILURE;
}
error
||=== Build: Debug in 1 (compiler: GNU GCC Compiler) ===|
E:\COOP\1\main.c||In function 'main':|
E:\COOP\1\main.c|12|error: 'nullptr' undeclared (first use in this function)|
E:\COOP\1\main.c|12|note: each undeclared identifier is reported only once for each function it appears in|
E:\COOP\1\main.c|27|error: expected declaration specifiers or '...' before