The reason I wanted to including this was because if I do enter too many characters the program just throw's me out to the default error code at the end. Wanted to be aware that I had made a mistake...
Type: Posts; User: johnpr
The reason I wanted to including this was because if I do enter too many characters the program just throw's me out to the default error code at the end. Wanted to be aware that I had made a mistake...
Heres the complete program. It does work how I need it to with gets, just wanted to address the buffer overflow issue (Have kept array very small to make it easier to test)
#include<stdio.h>...
Ok, I have removed the variable from the case, it was an attempt to clear the array for re-use. I have had numerous attempts to get this to display the error message but no luck, just running out of...
I am using the code below as part of a bigger program to accept strings of words from the user and analyze them using several other cases. I initially used gets where the program worked as it should...
It was the txt that was missing on the end of the path, also got fgets to work will have to go over it later to try and make sense of it. Thankyou for you help.
The file is located in the following position, is not protected and is created by wordpad
E:\Numbers
Will give fgets another go
Hello
Sorry should have seen the int before main, begining to wonder if i'll ever get the hang of this. I have tried giving the filename up to 100 characters but still returns the same error also...
Hi all
I am in the initial stages of writing a program to perform mathematical tasks from digits placed in a file, namley notepad. The program keeps returning "No such directory" when I enter a...
Ok that kind of makes sense will give it a go and let you know, thanks for your help.
I did wonder why it went funny when a character was entered, thanks. I have made the change but it now asks for the word to be entered between each option is there a way to get it to hold on to the...
Would it be ok to ask how to loop this program so that the user doesnt have to exit each time to enter a new word i have tried both adding an extra case and a do while loop but nether seem to want to...
That works perfectly, cant thank you enough.:)
My apologies very new to this, how do I initialize them do you have an example:redface::confused:
Thank you for such a quick reply. If i choose any of the cases more than once it adds the result to the previous so there may be a bigger problem than i first thought, Should i move all of the...
Hello
I am trying to create a program for analyzing user input words and have come up against a problem with the results returned.
The program starts by asking the user for a character string...