This works:
This does not work:Code:int vector[2][3] = {{5,5,5},{5,5,5}};
I've toyed around with it some, but I cannot figure out what I'm doing wrong.Code:int vector[2][3]; vector = {{5,5,5},{5,5,5}};
This works:
This does not work:Code:int vector[2][3] = {{5,5,5},{5,5,5}};
I've toyed around with it some, but I cannot figure out what I'm doing wrong.Code:int vector[2][3]; vector = {{5,5,5},{5,5,5}};
Videogame Memories!
A site dedicated to keeping videogame memories alive!
http://www.videogamememories.com/
Share your experiences with us now!
"We will game forever!"
When looking deeper, here:
vector is just an address of first element in an array of arrays. It makes no sense to try to change the poiner to {{5,5,5},{5,5,5}}.Code:vector = {{5,5,5},{5,5,5}};
Obsession to networking and protocols made me cook up these:
NSN - Network Status Notifier
epb - Ethernet Packet Bombardier
T.H.O.N.G.S - Textmode Helper On Network Getting Sniffed
Nibbles - console UDP print listener/filter + something else
Feel free to try, comment and improve =)
You have got to be kidding me. I know that you can use an array's name as a pointer to that array, so I thought that I could use the pointer and define it thusly. It surprises me that it doesn't work that way.
array is not a pointer, there are situations when array name is automatically casted to the pointer to the first element of the array...
but you cannot modify it
it just like saying that because 2+3 is int you think it is logical to assign to it some other value like
2+3 = 6
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler