generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: C++ Matrix question

Previous Thread :: Next Thread 
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
21 Jan 2015 06:27 PM
when I try to create a matrix like this:

int matrix[][] = {{1,2},{3,4}};

I get an error saying "an array may not have elements of this type". However, when I do this:

int matrix[][2] = {{1,2},{3,4}};

It works fine. My question is why do I have to specify the size of the second dimension?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Jan 2015 06:30 PM
A multidemensional array must have declared sizes for all but the first.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Jan 2015 06:31 PM
I'm more of a C guy but why not use a vector (part of std namespace)?
Report Abuse
MilkTreatGolem is not online. MilkTreatGolem
Joined: 23 Aug 2011
Total Posts: 19441
21 Jan 2015 06:57 PM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Jan 2015 07:00 PM
Have you seen yourself Mr. horrible at dota
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
21 Jan 2015 07:07 PM
Oh god. Who woke the troll up this time..
Report Abuse
protectiveEBob is not online. protectiveEBob
Joined: 09 Jul 2012
Total Posts: 1297
21 Jan 2015 07:25 PM
I actually thought both dimensions needed to be set, maybe that book was too old after all.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Jan 2015 07:27 PM
It's honestly better if they are both/all set.
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
21 Jan 2015 07:32 PM
Can't killme you more of an B guy cuz u BASIC you lame skid.
Report Abuse
ConexLeader is not online. ConexLeader
Joined: 05 Jan 2015
Total Posts: 2797
21 Jan 2015 07:34 PM
Get out keith
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
21 Jan 2015 07:34 PM
Isaac ew u r new here u punk leave!!!!!!1
Report Abuse
ConexLeader is not online. ConexLeader
Joined: 05 Jan 2015
Total Posts: 2797
21 Jan 2015 07:35 PM
@ChiefDelta - /care
Report Abuse
protectiveEBob is not online. protectiveEBob
Joined: 09 Jul 2012
Total Posts: 1297
21 Jan 2015 07:36 PM
Yay, the c++ noob was right!!1111
Maybe I will learn it.
Report Abuse
ConexLeader is not online. ConexLeader
Joined: 05 Jan 2015
Total Posts: 2797
21 Jan 2015 07:40 PM
@ChiefDelta - i am learning lua though and so far so good
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
21 Jan 2015 07:41 PM
Isaac it will take a bit but good on u
Report Abuse
UnvaryingC0DER is not online. UnvaryingC0DER
Joined: 10 Aug 2014
Total Posts: 173
21 Jan 2015 07:52 PM
>C++
>Scripters

gtfo this is lua
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
21 Jan 2015 07:53 PM
that conex guy is here.


::_::goto_
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image