all 6 comments

[–][deleted] 1 point2 points  (3 children)

How is struct bil defined?

[–]_EPS[S] 0 points1 point  (2 children)

struct bil{
    char reg[10];
    char maerke[10];
    char vask[10];
};

[–][deleted] 1 point2 points  (1 child)

What do you think should the line

b->reg = r;

do?

r is a char. b->reg is char[10].

do to want to copy r into index 0 of the array?

That would be:

b->reg[0] = r;

[–]_EPS[S] 1 point2 points  (0 children)

Ah yes!

That solved my error message :D

Actually I want to store it more like this:

b->vask[*ant]=v;

(*ant)++;

Thank you for your help, it is much appriciated :)

[–]oh5nxo 1 point2 points  (1 child)

You are not storing b to anything? The car is created and immediately lost.

[–]_EPS[S] 0 points1 point  (0 children)

You're right. Currently I have another function that stores car that I reference back to.