Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pointer help for a simple 1D array! :)

Status
Not open for further replies.

jdarvwill

Technical User
May 22, 2002
12
0
0
CA
hi, beginning C++ programming after a semester of C.

I want to fill an array of one data type approx. 50 items in a function, with the variable declared w/i main. I remember using pointers to fill structures with data, but cannot get it to work with my array. I'm sure i'm missing something simple.... any help would be much appreciated. Thanks.

p.s. Would a call by reference work in this case?
Or because its an array is it not possible?
 
Post the code in question.
James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.

[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top