hi, im am wondering if the is a way to make a 2D array of variable length. I have tried making a variable and assigning it a value and then used that variable to define the size of the array, but i cannot seem to get that to work. Is this possible or is there a way around this? Or simply do i just have to make the array very large and hope it does not exceed this value.
keatsey-9
0
Newbie Poster
Recommended Answers
Jump to Postyou need to post some code that illustrates what you are trying to do. Newest c++ standards allow for creating arrays with variables, but some compilers may not support this. For example
int foo(int size) { char array[size]; }
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
keatsey-9
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.