Hello,
I want to create filenames such as Query.student.1.bin and save them in an array.
I have no problem when I don't include a "." between student and number "1" but as I add a "." there my code does not run. ( it does complie but crashes during the run)
In this day and age of C++, there is hardly a reason to use new[] / delete[] to create a dynamic array. Use container classes such as vector -- that is what vector is designed for.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; October 2nd, 2012 at 04:56 PM.
I have no problem when I don't include a "." between student and number "1" but as I add a "." there my code does not run. ( it does complie but crashes during the run)
You more than likely corrupted the memory due to incorrect usage of new / delete (which is why you should use containers, so these mistakes are not made).
In actuality, we don't know what you really did, since you didn't post your actual program that you're running. We don't know the data you're using, the flow of the program, where these lines are called/used, etc. We don't even know what "Table_Name", or convertInt() is.
Post a full, but simple program that demonstrates the error.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; October 2nd, 2012 at 05:08 PM.
Bookmarks