#include <stdlib.h>
int main (void) {
char *pfilename;
pfilename = malloc( 1 );
return 0;
}
error: invalid conversion from `void*' to `char*'
pfilename = (char*)malloc( 1 );
Quoteerror: invalid conversion from `void*' to `char*'
Of course thisCodecompiles without errors.. But this is not ANSI C right?pfilename = (char*)malloc( 1 );
Thank you very much!
\f.c In function `int main()':
\f.c 6 error: invalid conversion from `void*' to `char*'
=== Build finished: 1 errors, 0 warnings ===
ok i enabled full-command-line logging but the message is exactly the same as above..
Seems like it cannot see that my file is a C file (despite the fact that its .c)Look at the file's (!) properties what compiler environment is selected there. Maybe you changed that by accident.
what do u mean? where do i find this?File -> properties -> tab "advanced" -> compiler variable and compiler. Do *not* modify just post what's written there.
erm.... nothing?!!...but you*did* create a project? Or do you try to compile a single file? If so - create a project. ;-)
why it does compile but uses the wrong compiler?This is by design. Supporting single-file compilation has limitations (for several good reasons). Actually I would vote to disable it completely to avoid such misunderstandings.
Actually I would vote to disable it completely to avoid such misunderstandings.
Quote from: BloodyCakeActually I would vote to disable it completely to avoid such misunderstandings.
I would vote to improve it (that's what I use the most of C::B) :D
I change my vote to have an "all-in-one device suitable for every purpose" a.k.a. "Swiss Army knife". I am already developing the coffee maker plugin... stay tuned. :lol:I would vote to have an option to enable it; that by default is disabled.Quote from: BloodyCakeActually I would vote to disable it completely to avoid such misunderstandings.I would vote to improve it (that's what I use the most of C::B) :D