Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

setting the size of a matrix (array bound is not not an integer constant)

Hello Experts,

I'm trying to make a matrix thats size depends on inputs from a file.

my code is something like:

int a,b,c;
int Matrix{a]{b]{c];  //i use normal brackets in the real code

then in the main I have it read from a file to get a,b,c and then go from there.

I am a novice C++ programmer.

Thank you.
0
NAB015
Asked:
NAB015
  • 3
1 Solution
 
phoffricCommented:
There are some good ideas here
    http://rdsrc.us/wVe3NA

and here
    http://rdsrc.us/yLHo3y

and here
    http://rdsrc.us/Ev4fF8
0
 
NAB015Author Commented:
Thanks for pointing me in the right direction. An EE search might come after a google search before I post a question. Thanks.
0
 
phoffricCommented:
When doing an EE search, first enter your keywords, then hit the advanced button and add a filter zone and choose C++ to reduce the number of hits.
0
 
phoffricCommented:
If you have any questions when trying to implement this dynamic matrix (aka dynamic 2d array), don't hesitate to ask if you get stuck.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now