May 13, 2013 at 7:43am May 13, 2013 at 7:43am UTC
I am getting "Access violation reading location 0x029C4010."error while running this program though It does not show any errors.
What is wrong with this? thanks for looking into it.
ifstream myfile;
Last edited on May 14, 2013 at 10:10pm May 14, 2013 at 10:10pm UTC
May 13, 2013 at 7:53am May 13, 2013 at 7:53am UTC
Are you sure the magic number is enough? Would it not be neater to use std::vector, which has push_back()?
Are you sure that all of the myfile>>name>>V[i]>>S[i];
succeeds every time?
Why do you read into char array instead of std::string?
The A, V, S together could be a struct?
Edit: "Dynamic programming"?
Last edited on May 13, 2013 at 7:55am May 13, 2013 at 7:55am UTC
May 14, 2013 at 6:59am May 14, 2013 at 6:59am UTC
Thanks. I used a vector instead of array.