cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
**pointer and 2D array
**pointer and 2D array
Dec 8, 2013 at 11:14pm UTC
huatrunghieu113
(3)
I have **pointer and 2D array
1
2
int
*a[10];
int
**p=a;
Ex: size of 2D array a[3][3]
I want use **p to print column of array
such as: a[0][2] , a[1][2], a[2][2]
Sr! I'm not good english
Dec 9, 2013 at 6:17am UTC
mattballj10
(17)
I'm confused what you are saying because
**p=a;
is a pointer to a pointer. You wouldn't use that to print.
First off, you need to dereference (&) the pointer so that you can output the values and not the address inside the array.
Topic archived. No new replies allowed.