Is it possible to ask the user to input the size of a 2-dim array?
JackDurden
0
Junior Poster in Training
Recommended Answers
Jump to PostYou have to be a little more careful, but this is how you can do it.
int main() { int rows, cols; int **pointer; cout<<"Enter rows and columns for your 2-D array\n"; cin >> rows >> cols; // allocate a row of pointers. pointer = new int*[rows]; …
All 4 Replies
ArkM
1,090
Postaholic
JackDurden
0
Junior Poster in Training
stilllearning
148
Posting Whiz
Agni
370
Practically a Master Poster
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.