Problem addition
User NoobMugger420
Submission Time 2024-10-18 17:49:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp: In function ‘int main()’:
addition.cpp:7:12: error: cannot convert ‘const char*’ to ‘FILE*’ {aka ‘_IO_FILE*’}
7 | fscanf("%d %d", &num1, &num2);
| ^~~~~~~
| |
| const char*
In file included from addition.cpp:1:
/usr/include/stdio.h:391:37: note: initializing argument 1 of ‘int fscanf(FILE*, const char*, ...)’
391 | extern int fscanf (FILE *__restrict __stream,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
addition.cpp:8:16: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
8 | printf(num1+num2);
| ~~~~^~~~~
| |
| int
In file included from /usr/include/stdio.h:867,
from addition.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note: initializing argument 1 of ‘int printf(const char*, ...)’
105 | printf (const char *__restrict __fmt, ...