the Rainbow Networks
+++eXy FFA
Map: q3dm6
Players: 4 / 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: Evilemerold
New Today: 0
New Yesterday: 0
Overall: 354

People Online:
Members: 0
Visitors: 45
Total: 45
Who Is Where:
 Visitors:
01: The golden pot
02: Rainbow Media
03: The golden pot
04: Home
05: The golden pot
06: Home
07: The golden pot
08: The golden pot
09: The golden pot
10: Shoutblock
11: Rainbow Media
12: The golden pot
13: The golden pot
14: Rainbow Media
15: Home
16: The golden pot
17: The golden pot
18: Home
19: The golden pot
20: Rainbow Media
21: Maps
22: The golden pot
23: My Account
24: The golden pot
25: The golden pot
26: The golden pot
27: Maps
28: Maps
29: The golden pot
30: Home
31: The golden pot
32: The golden pot
33: The golden pot
34: The golden pot
35: Shoutblock
36: Home
37: Maps
38: Maps
39: The golden pot
40: The golden pot
41: Maps
42: My Account
43: The golden pot
44: The golden pot
45: 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