the Rainbow Networks
RN|VQ3 DEFRAG
Map: si
Players: 0 / 18

+++eXy FFA
Map: eadm11
Players: 2 / 18
The golden pot › RAINBOW NETWORKS › Tech & Support › something for C geeks d-:=
something for C geeks d-:=
Something wrong with our servers or your system?
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexTech & Support
View previous topic :: View next topic  
Author Message
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Fri Jan 09, 2009 10:13 pm    Post subject: something for C geeks d-:= Reply with quote

How do i allocate 2-dimensional arrays without using an array of pointers, like it is used HERE and keeping it as simple as possible?

This works of course,
Code::
  z = malloc(30*(20*sizeof(int)));
but i cant access it by using a[x][y].

_________________
Back to top
View user's profile Visit poster's website
jackthompson
Admin
Admin


Joined: Aug 15, 2007
Posts: 1302
Location: Here

PostPosted: Sat Jan 10, 2009 5:41 am    Post subject: Re: something for C geeks d-:= Reply with quote

int a[30][20];
Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Sat Jan 10, 2009 3:20 pm    Post subject: Re: something for C geeks d-:= Reply with quote

harhar. must be dynamic.

_________________
Back to top
View user's profile Visit poster's website
jackthompson
Admin
Admin


Joined: Aug 15, 2007
Posts: 1302
Location: Here

PostPosted: Sun Jan 11, 2009 5:34 am    Post subject: Re: something for C geeks d-:= Reply with quote

#ifdef DYNAMIC
int a[30][20];
#endif
Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Sun Jan 11, 2009 2:25 pm    Post subject: Re: something for C geeks d-:= Reply with quote

nvm :ops:

_________________
Back to top
View user's profile Visit poster's website
jackthompson
Admin
Admin


Joined: Aug 15, 2007
Posts: 1302
Location: Here

PostPosted: Sun Jan 11, 2009 4:22 pm    Post subject: Re: something for C geeks d-:= Reply with quote

then do it as they say here... :D

www.eumus.edu.uy/eme/c...e/sx9.html

it shows how it is done...
Back to top
View user's profile
Joki
Übergod
Übergod


Joined: Apr 16, 2008
Posts: 1037
Location: at tiled stove

PostPosted: Sun Jan 11, 2009 6:51 pm    Post subject: Re: something for C geeks d-:= Reply with quote

Well, i'm afraid of **a. :i
So i hoped there'd be another way.

_________________
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum Index -> Tech & Support All times are GMT + 1 Hour
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Welcome Anonymous


Membership:
Latest: kontol
New Today: 0
New Yesterday: 0
Overall: 355

People Online:
Members: 0
Visitors: 39
Total: 39
Who Is Where:
 Visitors:
01: The golden pot
02: The golden pot
03: The golden pot
04: Maps
05: The golden pot
06: The golden pot
07: Home
08: The golden pot
09: The golden pot
10: The golden pot
11: Rainbow Media
12: The golden pot
13: Maps
14: The golden pot
15: Rainbow Media
16: Maps
17: The golden pot
18: The golden pot
19: The golden pot
20: The golden pot
21: The golden pot
22: The golden pot
23: The golden pot
24: Maps
25: The golden pot
26: The golden pot
27: The golden pot
28: The golden pot
29: The golden pot
30: The golden pot
31: Rainbow Media
32: The golden pot
33: Home
34: The golden pot
35: The golden pot
36: Maps
37: The golden pot
38: The golden pot
39: Maps

Staff Online:

No staff members are online!

The Rainbow Networks website is hosted by JockeTF and Soder on furver.se.

The Rainbow Networks
Interactive software released under GNU GPL, Code Credits, Privacy Policy
Azul theme and related images designed by Jamin