I’,m probably doing some incredibly stupid mistake, but i cannot find it, it is simple that:
int main()
{
typedef struct drzemka typ;
struct drzemka {
int strukcje;
};
typ *d;
d->strukcje = 1;
}
and it is not working
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right now your pointer is not set to a valid piece of memory. You need to allocated this memory for the
struct:As with any memory you allocate, remember to free it after you’re done: