C access violation after using calloc?

RoomsizeroomIndex is the same as (RoomsizeroomIndex) You want to say (*Roomsize)roomIndex.

RoomsizeroomIndex is the same as *(RoomsizeroomIndex). You want to say (*Roomsize)roomIndex. (I'm assuming that Roomsize is actually a int**.

If that's not correct, then the problem may lie elsewhere. ).

That worked! What do the brackets actually signify? – user28871 Jan 31 at 19:02 And your assumption is correct.

– user28871 Jan 31 at 19:02 The brackets are the normal array access operator. According to the order of operations, array access occurs before pointer dereference. – Daniel Gallagher Jan 31 at 19:07 Ah I think I get it now.. thanks for the help Daniel.

– user28871 Jan 31 at 19:10.

Your first line, when you allocate Roomsize, looks wrong. If I am correct in assuming Roomsize is an int *, you should just say Roomsize = (int *) calloc... As @Daniel posted, your assignment should also be changed to get rid of the asterisk.

No it's fine the way it is I think. (Otherwise I'm assuming it wouldn't get past the compiler). Daniel is correct in his assumption that Roomsize is an int**.

It's declared outside the file as an int* and passed in via pointer as I'm going to be writing it.. therefore I'm dereferencing it first. Thanks for the help though. – user28871 Jan 31 at 19:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions