Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • So if I wanted to print the array in the A(int* arr), how could I do that? Or is it even possible to do it? Commented Jul 12, 2014 at 5:23
  • 1
    @jmh: It's not possible, since function A received only one int*. Since your data are individually allocated using new int(i), they aren't consecutive and you can't find the other elements from the first. What you could do is to pass the array of int*, as type int**, and access the same way you do in main. Commented Jul 12, 2014 at 5:31
  • @BenVoigt Thank you! That was what I was trying to accomplish. Commented Jul 12, 2014 at 5:51