cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Pointer table.
Pointer table.
Sep 9, 2015 at 3:43pm UTC
mishappp
(59)
I'm trying to get this program to work, I'm having pointer crashes as soon as the program hits line 62 on the second iteration, I think I have some how lost the array information, any suggestions?
http://pastebin.com/DjPMLS2W
Table :
http://i.imgur.com/kdW6t73.png
Last edited on
Sep 9, 2015 at 5:16pm UTC
Sep 9, 2015 at 5:14pm UTC
ne555
(10692)
You are passing your parameters by copy, any change in them would be local to the function.
`s' and `t' should be pointing to the same place, ¿why is their type different?
Sep 9, 2015 at 5:19pm UTC
mishappp
(59)
I thought if you had
1
2
3
4
5
6
7
8
int
***a =
new
int
**; *a =
new
int
*; **a =
new
int
; ***a = 18
int
*c = **a;
Wouldn't that make c point to the int stored in ***a?
Sep 9, 2015 at 6:50pm UTC
ne555
(10692)
¿so?
Sep 9, 2015 at 7:27pm UTC
mishappp
(59)
So wouldn't I would need to point t to the second level of indirection of s, so wouldn't I need to point t to the base level of s?
Last edited on
Sep 9, 2015 at 7:29pm UTC
Topic archived. No new replies allowed.