Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
翠星石 (suiseiseki@freesoftwareextremist.com)'s status on Friday, 18-Oct-2024 21:24:00 JST翠星石 @SuperDicq main.cpp:5:26: error: invalid conversion from ‘void*’ to ‘int*’ [-fpermissive]
5 | int *yes = malloc(sizeof(int)*4);
| ~~~~~~^~~~~~~~~~~~~~~
| |
| void*
The C++ spec refuses to allow implicit casting even in well formed cases, so you have to either compile with -fpermissive or cast.