Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 4th, 2005, 07:33 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default jagged array help

hi,
i have a jagged array created in java like this:

int [][]jagged={{1,2,3},{4,5},{6}};

i need to writea C++ code fragment which defines a similar jagged array (with similar initial values as well).

can anyone help me??

thnx,

Reply With Quote
  #2 (permalink)  
Old December 4th, 2005, 10:45 PM
Authorized User
 
Join Date: Nov 2005
Location: , , India.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess this is what you want
int jagged[][3]={{1,2,3},{4,5},{6}};

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
Passing jagged array to com object nutrino VB How-To 0 January 27th, 2006 01:07 PM
passing jagged array of objects nutrino Beginning VB 6 0 January 27th, 2006 11:58 AM
Passing php array values to javascript array gkrishna Pro PHP 0 November 6th, 2004 03:20 AM
jagged array problems, who can help me? hlchuah77 C# 2 July 1st, 2004 10:37 AM



All times are GMT -4. The time now is 02:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.