I figured it out. Turns out my array had some random junk in it that was messing up the file opening so it worked sometimes but not others.
Type: Posts; User: mdekom12
I figured it out. Turns out my array had some random junk in it that was messing up the file opening so it worked sometimes but not others.
Hey guys,
I have a simple function that reads info from a file and stores in into arrays. An example of the file is shown below:
So basically, the program scans in the first number, second...
It needs to be a 2-D array so I can add the .txt to the end of it.
I think we're deviating from the point here, I still don't know how to fix this problem.
garbage is not a 2-D array, drill is.
Garbage is just an array that I use to store the newline character (it's what my professor taught me).
char drill[1][SIZE];
char garbage[2];
where SIZE is defined as 500, for storing long...
Hey guys,
Still working on my project for my programming class and I have encountered yet another problem! I have a function that asks the user to enter a drill name. The function will then search...
What would you suggest?
Ok I think I found what the problem is, but I'm not sure how it happened or how to remedy this situation. Turns out before I ask the user to enter the title of the drill, the array isn't clear. ...
I don't think this is the problem, because it still opens the file. If I add the -1 after the strlen, then it begins to delete the name of the drill. This is because I removed the newline in the...
Hey guys,
I'm still working on my project for my programming class and I'm having weird trouble passing a string to a function. Basically, my project is a list of menus that a user can navigate...
WOWWWWWWWWWWWww
I had that separated at first but I thought it would save time by just throwing it in there, didn't realize it would mess up everything! Thank you so much!
:D
Hey guys,
I'm working on a project for my programming class, and for the part I'm working on, I ask the user if they want to repeat the sequence again or return to the menu. If the user enters 1 it...