i'm having a rough time with this. This is actually a program I was trying to help someone else out on and in the process i've run into this unresolved external symbol error for double temp1[]. i've tried a variety of different things to fix it. googled it ect. for w-e reason i can't make it go away unless I eliminate the array entirely. Not understanding if my usage of the array is wrong or what the deal is. Can someone please explain why i'm getting this error? An tell me how to fix. Thanx in advance
should i just punch in a number that I think is above what anyone would reasonably enter into this program? Bc the size is based upon the number of user inputs how can I define an unknown like that?
should i just punch in a number that I think is above what anyone would reasonably enter into this program?
That's one approach. Though if the user enters a number higher than that you'll have problems. One way to prevent that would be to stop accepting input once you reach that limit.
Another option would be to use a vector, which basically is a resizable array, so you can keep adding new elements to the end of it without having to define a fixed size.
Another option is to use new to allocate the amount of memory you need when you find out from the user. Using a vector is definitely a better option, though.
sweet, I played around with this w/o the above info till my head exploded. So my hat sits a lil lower now. I will take the advice an try it out tomorrow.