forcing xcode to use C instead of cpp

Hi there
a friend sent me a project template for xcode, but seem to be using c++ and we dont know how to change it to c


float *a;
a = malloc(5 * sizeof(float));

I get error

/Users/jmazo/CUDA/Promedio_credito/C/main.c:17: error: invalid conversion from 'void*' to 'float*'

I've all that seem obvious in the project preferences but no luck

any help is welcomed

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Never mind I found it there

Never mind

I found it

there as an option

compile sources as:
file type

the file tipe was .c

but when I changed that compile sources as "C" it worked

but any ideas why the deafault wont catch the .c extension

thanks

Extension problem?

It can't possibly be because the extension is hidden and the file is really names something.c.cpp? That happens sometimes. It should show correctly in the IDE though.