Way off, think I got it...


[ Follow Ups ] [ Post Followup ] [ CPU-Central Message Board ] [ Home ]

Subject: Way off, think I got it...
Name: SickOfItAll
Date: 4/10/2002 11:10:46 AM (GMT-7)
IP Address: 208.1.79.30
In Reply to: Is it... posted by SickOfItAll
Message:

myArray is local scope to the function foo(). When called, foo() returns a pointer to the myArray[] variable's contents, but once the pointer is returned and the function ends, myArray[] falls out of scope so the pointer returned is useless.

You would need to declare myArray as static, pass it in as a parameter, or declare it as a global var.

Is that it?

[ View FollowUps | Post Followup | E-Mail Sender | Main ]



Follow Ups:



Maximum of 100 messages displayed.

Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:
Upload some images for this post


[ Follow Ups ] [ Post Followup ] [ CPU-Central Message Board ]