Hello everyone or anyone! Could some please assist me on how to read a text file like this: ProgrammingAssignment1Data.txt 123 South Market Street Downtown 101 Package 0 1599 Burbank Road Cinema 10 Movie posters in tubes 1 1 order slip format is: Pick up address Drop off address item description order number I am trying to read the file to put each slip in an array. Any advice! Thanks in advance!:cool:

Member Avatar
Member Avatar
+0 forum 3

What i'm trying to do here is just place the values in my text file into variables the txt file contains: 1111 50 2222 60 3333 70 4444 80 5555 90 i get the error :[COLOR="red"]Exception in thread "main" java.lang.NullPointerException at udptry2.m.readfiless(m.java:41) at udptry2.m.main(m.java:68)[/COLOR] [CODE] package udptry2; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.IOException; /** * * @author JAY THE KIDD */ public class m { BufferedReader in; BufferedWriter out; int a; String[] id; String[] result; public void openfile() { try{ FileReader inputFile = new FileReader("serverdata.txt"); in = new BufferedReader(inputFile); }catch(Exception e) { System.out.println(e +"File not found"); }//end of …

Member Avatar
Member Avatar
+0 forum 6

what is this variable: [CODE]$/[/CODE]

Member Avatar
Member Avatar
+0 forum 3

Hi everyone, Im new to coding and php and need some assistance on how to read php information from a file and display it in an html table. Basically the site my teacher has asked me to make is one where i can type in a url, link text into a text field, write that to file, then read it back and display them in a html table.(there is more functionality but it is not relevant to mention until I can read it back) I have the information writing to file ok, its the reading back thats a problem. I …

Member Avatar
Member Avatar
+0 forum 1

Hello Everybody I cannot get my file to open in my eof program. Outlined below is what the program needs to do: 1) Program needs to read from a file (ex. "Data.txt") 2) Program needs to read even & odd numbers down file. (ex. 2 3 12 5) 3) Program needs to add even numbers and display sum 4) Program needs to ass odd numbers and display sum also 5) Program needs to close properly Here is what I have so far: [CODE] // Author: // Ch.5 Exercise 6 // Program: EOF-even/odd // Oct. 4, 2010 #include <iostream> #include <fstream> …

Member Avatar
Member Avatar
+0 forum 5

hi i am writing a program that reads integers(signed or unsigend) from file. my input file contains these numbers(without brackets) [41 35 -66 -124 -31 108 -42 -82 82 -112 73 -15 -15 -69 -23] and my code is: [CODE]#include <stdlib.h> #include <stdio.h> #include <conio.h> #include <string.h> main() { FILE * hFile; int c; long n = 0; hFile = fopen("input15Numbers.txt", "r"); if (hFile == NULL) { printf("Failed to Open the File"); } else { while (!feof(hFile)) { c = fgetc (hFile); if (c != ' ') { fscanf (hFile, "%i", &c); printf("%i", c); printf("\n"); } fclose(hFile); getch(); } }[/CODE] …

Member Avatar
Member Avatar
+0 forum 1

The End.