Just because struct cd has a member named x doesn't mean that if you have an int x in main it will be the same thing. Here is your code with a couple of changes so that it will compile, and in a more readable format:
Code:
#include <stdio.h>
struct cd {
int x;
int lol;
};
read(int *e) {
printf("Please enter number: ");
scanf("%d",e);
printf("Number is %d\n",*e);
}
int main(void) {
struct cd mkcd;
read(&mkcd.x);
printf("Number is %d\n",mkcd.x);
return 0;
}
I added the line in green, and the \n's...it's just like christmas!