User Profile
Collapse
-
Ok thanks for the help guys and sorry for the headache!... -
i'll have to read up on calling by reference and call by address. below wont work...Leave a comment:
-
-
ok i see. i thought differently. so within my buildArray funcion, can i somehow tell it to store the values indefinately? or would that mess up my other functions?...Leave a comment:
-
yea thats right! if i wanted my array to hold 10 values, it would have 0-9.
ok i will read that. thanks for the link. can i PLEASE post my entire program? just this once. you can give me the ok and i would only do it if i was given the approval. then you can actually see whats going on. or can i send you the .cpp file?...Leave a comment:
-
i just thought my buildArray function was storing the values from the file into each element of the array. i dont know...Leave a comment:
-
Yes, the unsubscripted name of the array is the address of the array. thats why it gave me ox22c....... i know the difference. cout << ar[79] prints out the value in element 79 it the array can hold that much, correct?...Leave a comment:
-
-
yea your printing the array and the array elements in the other....Leave a comment:
-
ok so evidently i need the caller(buildArr ay(storescores) to store the retgurned values into the array? how in the world can i do that?...Leave a comment:
-
-
ok after every call to the functions doing all the work. i cout'ed the array and received this: 0x22fc180...Leave a comment:
-
-
here:
...Code:buildArray(storescores) int buildArray(int ar[]) { int temp, i = 0; ifstream inFile; inFile.open("a8.txt"); if(inFile.fail()) { cout << "Error opening input file"; exit(1); } inFile >> temp; while(!inFile.eof()) { ar[i] = temp; i++;Last edited by sicarie; Mar 31 '07, 09:39 PM. Reason: Please use [code] and [/code] tags around your code.Leave a comment:
-
i built the array from a txt file. i thought that after you build it, it always holds what goes in there? maybe i need to build it again before the median call?...Leave a comment:
-
could point, hold on let me see so i can explain. now im confused by my own code. ha-ha!...Leave a comment:
-
i know im not supposed to do this but can i please copy and paste my whole program? maybe you will catch something i am not....Leave a comment:
-
do i need to build the array before the caller to the media function??...Leave a comment:
-
-
No activity results to display
Show More
Leave a comment: