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

People Online:
Members: 0
Visitors: 17
Total: 17
Who Is Where:
 Visitors:
01: Rainbow Media
02: The golden pot
03: The golden pot
04: The golden pot
05: Maps
06: The golden pot
07: The golden pot
08: The golden pot
09: Maps
10: Home
11: The golden pot
12: My Account
13: The golden pot
14: The golden pot
15: The golden pot
16: The golden pot
17: Rainbow Media

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