Solved

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

Posted on 2011-03-23
4
305 Views
Last Modified: 2012-05-11
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
Comment
Question by:NAB015
  • 3
4 Comments
 
LVL 32

Accepted Solution

by:
phoffric earned 250 total points
ID: 35202546
There are some good ideas here
    http://rdsrc.us/wVe3NA

and here
    http://rdsrc.us/yLHo3y

and here
    http://rdsrc.us/Ev4fF8
0
 

Author Closing Comment

by:NAB015
ID: 35202788
Thanks for pointing me in the right direction. An EE search might come after a google search before I post a question. Thanks.
0
 
LVL 32

Expert Comment

by:phoffric
ID: 35202827
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
 
LVL 32

Expert Comment

by:phoffric
ID: 35202844
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now