Below is my code segment for a homework assignment in my class, but when I try to compile it pops:
[Error] invalid conversion from 'void*' to 'int*' [-fpermissive]
on the pointers1-3, the choice, and the two options. I am still a newbie programmer and I am not sure why that is occurring now.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *pointer1, *pointer2, *pointer3;
int *choice;
char * option;
char * option1;
pointer1 = malloc ( sizeof(int) );
pointer2 = malloc ( sizeof(int) );
pointer3 = malloc ( sizeof(int) );
choice = malloc ( sizeof(int) );
option = malloc ( sizeof(char) );
option1 = malloc ( sizeof(char) );
}