Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ integer array
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
| Date
| Sat 30 Jun 2007 02:54 AM (UTC) |
| Message
| file misc.c:
//declared at top of file
int spaceused[200][5][5];
function nextLetter()
(line 2865) int spaces[200][5][5];
(line 2871) spaces = spaceused;
(line 2886) spaceused[wordcount] = spaces[num];
misc.c: In function `nextLetter':
misc.c:2871: incompatible types in assignment
misc.c:2886: incompatible types in assignment
can anybody tell me how i would get these operations done? | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Sat 30 Jun 2007 03:03 AM (UTC) |
| Message
| You have to copy the entire array element by element. Arrays aren't objects that can be assigned back and forth.
You could try memcpy'ing the source to the destination, but you'd have to be careful -- and depend on the fact that on almost all implementations, arrays like that are allocated in a contiguous block. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
| Date
| Reply #2 on Sat 30 Jun 2007 03:20 AM (UTC) |
| Message
| | bah figures, appreciate the feedback, was hoping for an easy way to do it, not like a couple for-loops are all that hard but oh well. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,419 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top