foo.cc:7:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
7 | printf('%.2lf',fabs(a));
| ^~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:7:16: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
7 | printf('%.2lf',fabs(a));
| ^~~~~~~
| |
| int
In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/cstdio:42,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ext/string_conversions.h:45,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bits/basic_string.h:4154,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/string:54,
from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/bitset:52,
from stdc++.h:52:
/nix/glibc-2.40-66-dev/include/stdio.h:363:43: note: initializing argument 1 of ‘int printf(const char*, ...)’
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:8:17: error: expected ‘;’ before ‘}’ token
8 | return 0
| ^
| ;
9 | }
| ~