Because “printf” is the printing method of C language, it is necessary to refer to the header file #include & lt; stdio. H & gt;
or replace printf with the printing method cout
in C + + under the G + + compiler
Similarly:
error: ‘nullptr’ was not declared in this scope