5 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for scott_liddle

I'm creating a program that carrys out certain things dependent on the user input. One function is to read text from a text file, another is to add text to the same text file. I'm unsure about how to add an exception handler to make sure the text input is …

Member Avatar for ihatehippies
0
208
Member Avatar for chebude

I am trying to catch error on file input/output. The try functions works fine but as it pass to the next line my code breaks. How can I exit gracefully when the 'infile' doesnt exist? [CODE] try: infile = open ('Book1.txt', "r") except IOError: print "input file %s is missing" …

Member Avatar for chebude
0
260
Member Avatar for mags11

Hello again! I'm almost finished this project. However, the Clear button stopped doing its thing. It keeps giving me an "Invalid Cast Exception" whenever I am pressing the clear button. The project includes 2 forms--- JobInformation and Summary. The code follows: [CODE] 'Program Name: JobInformation 'Programmer: Zabinga 'Date: 11/28/2011 'Description: …

Member Avatar for mags11
0
389
Member Avatar for jcAmats

I’m creating a program that displays random lines from a file. I have 8 lines on my text file and after displaying the last/8th random line… it displays [B][I]Segmentation fault[/I][/B] and then terminates the program. The program should display a message saying that there are no lines left to display. …

Member Avatar for jcAmats
0
11K
Member Avatar for chiiqui

Can anyone help me with this? or alter the code of mine when it comes to the user Input here's the block of code of mine [CODE]public int Remove(int i, Briefcase c[], String[] m) { int nChoice = 0; System.out.print("\tPlease remove " + i + " cases: "); nChoice = …

Member Avatar for chiiqui
0
3K

The End.