I have a program that is to open a text file. The code compiles, appears to validate as it should and so on....except:
If I used this code to open the file:
bank = fopen("C:\\tma307\\itembank.txt", "r");
it opens just fine.
but if I use:
bank = fopen(Bank, "r");
it won't open (I get a popup error that reads "Project1 has caused an error in CC3260MT.DLL. Project1 will now close")
Bank is the itemfile and bank is the pointer for my program.
What hapens is:
--I click on run (using Borland C++ Builder)
--It brings me to a menu in dos and prompts me to select an item
--I select v (for validate file) and it brings me to a blank dos screen where I am prompted to type in the disk file name.
--This is where I first noticed the problem. I don't even have to type in a disk file name to get my text file. I could just hit enter or happy new year for that matter.
I believe that as I have already declared the disk file name in the code, the program already knows where to go. But, if I make changes to the text file (and save them of course), it doesn't recognize anything different.
I have read many many articles on fopen etc. to try and figure this one out but have been unsuccessful.
Any suggestions would be greatly appreciated!