I have created a new C++ project (to be able to use the graphics.h library) then I have tried to add a C project which works perfectly in C (by the way I have saved the file with .c extension). 2 line leads to error:
q = malloc(sizeof(struct QueueRecord));
this line leads to this error "invalid conversion from `void*' to `QueueRecord* "
q->array = malloc(sizeof(int) * maxElements);
and this line leads to this error "invalid conversion from `void*' to `int*' "
So to sum up what should I do in order to make this 2 lines of code working in C++? I have already tried to add (int *) to the beginning of the codes but didn't work.