Search:
Forum
General C++ Programming
value passing through vectors
value passing through vectors
Sep 30, 2010 at 9:19am UTC
mckingwan
(4)
Dear all,
I'm now writing a program, and want to save a value from one-dimensional vector to two-dimensional vector. But when I code like this
2DVector[][]=1Dvector[];
when the compiler passes, once I run the program, it hangs.
So, what's wrong with it? Thanks~
Sep 30, 2010 at 9:30am UTC
sohguanh
(1236)
Actually I don't understand what you want. You are saying you want to assign a 1-D array to a 2-D array ?
Oct 3, 2010 at 8:50am UTC
mckingwan
(4)
it should be pass a value from 1D array(or vector) to 2D array(or vector)
Oct 3, 2010 at 9:35am UTC
JoR
(101)
Why that? Most likely it's the best to keep it as you have it and put a class for 2D access around it...
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs