QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

C++ Help

This is a discussion on C++ Help within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Can you have Multi-dimensional Arrays within a structure? It's for my brother i have tried looking it up and i ...

Reply
 
LinkBack Thread Tools
Old 04-29-2006, 12:45 PM   #1

Party at Las Noches!
 
IchigoKurosaki's Avatar
 
Join Date: Jun 2005
Location: Florida
Posts: 1,648
Trader Feedback: 0
Default C++ Help

Can you have Multi-dimensional Arrays within a structure? It's for my brother i have tried looking it up and i can't find anything on it... I can get the source code if you like...

Thank you
__________________
.:Nobis Development Group:.
.:Personal Portfolio:.

Playstation Portable - PSP1001 - 3.90 M33-2
IchigoKurosaki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 12:52 PM   #2
 
Mr.Game's Avatar
 
Join Date: Mar 2006
Posts: 338
Trader Feedback: 0
Default

Best kept here

for all your C and C++ needs!
Mr.Game is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 01:09 PM   #3

Party at Las Noches!
 
IchigoKurosaki's Avatar
 
Join Date: Jun 2005
Location: Florida
Posts: 1,648
Trader Feedback: 0
Default

ok.... Could someone really help he needs this done for a friend this weekend....
__________________
.:Nobis Development Group:.
.:Personal Portfolio:.

Playstation Portable - PSP1001 - 3.90 M33-2
IchigoKurosaki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 01:38 PM   #4
 
Join Date: Apr 2006
Posts: 4
Trader Feedback: 0
Default

You can have multi-dimensional arrays in a struct, but you need to give the compiler some info about the dimensions. In a 2D array, the second dimension needs to be given (in order to determine how much further to look in memory when a subscript for the first dimension is given).
For example:

Code:
typedef struct someStupidStruct
{
int omg2DArray[][2];
}someStupidStruct;
Kage68 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2006, 04:23 PM   #5

Party at Las Noches!
 
IchigoKurosaki's Avatar
 
Join Date: Jun 2005
Location: Florida
Posts: 1,648
Trader Feedback: 0
Default

Thanks nice seeing new people on the boards that know what they are talking about
__________________
.:Nobis Development Group:.
.:Personal Portfolio:.

Playstation Portable - PSP1001 - 3.90 M33-2
IchigoKurosaki is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 11:11 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us