43 Topics

Member Avatar for
Member Avatar for deepecstasy

I have designed a linklist based BookStore in which book's attributes will be stored in a node & so on. Plus at the end of program, I have to save all database into text file *(I tried binary reading but damn I got me killed & couldn't do it)* & …

Member Avatar for deepecstasy
0
395
Member Avatar for malsmit2014

package furniture; import java.io.*; import java.util.*; public class Program3 { public static void main(String[] args) { //array of 10 Furniture object references String[] furniture = new String[10]; String filename = "furnitureData.txt"; Scanner input = null; try{ input = new Scanner(new File(filename)); }//end try catch(FileNotFoundException e){ System.err.println(e); System.exit(1); }//end catch }//end …

Member Avatar for DavidKroukamp
0
293
Member Avatar for skannigan

Hi, just a quick question. if i have an input file with 6 lines of data. for example(ingnore the numbers 1 to 6, they indicate the file number and is not part of the file physically) 1. Peter 3 / + - * 2. Dahne 8 + - / * …

Member Avatar for Ancient Dragon
0
204
Member Avatar for justin08

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 …

Member Avatar for stultuske
0
189
Member Avatar for muse_squall08

[CODE]#include <iostream> //standard input and output #include <fstream> //file input and output #include <string> //for strings #include <exception> //catches exceptions #include <sstream> //stringstream comes from here #include <algorithm> #include <stack> #include <queue> using namespace std; bool writeFile(const string &data); //writes strings to file bool readFile(); //read file bool palin(const string …

Member Avatar for WaltP
0
2K
Member Avatar for adohertyd

I am writing a spellchecker program and have some issues. First thing is that I need to make better use of the memory. My code iterates through a large dictionary file repeatedly. I know its better to read this into memory first then iterate through the block but I really …

Member Avatar for VernonDozier
0
205
Member Avatar for dancks

I was supposed to write a program that reads and writes phone numbers of people to a file called phones.txt. The reading part works. The write part doesn't. I tried to use the cat command because I thought doing cat >> file.txt would simply append to a file. What it …

Member Avatar for dancks
0
369
Member Avatar for rayden150

I cant seem to save these data correctly I have mainly doubles and strings, I am saving these in a .txt file called "autosAudi.txt", I get these weird codes and boxes and sometimes for whatever reason Chinese in my textfields? Here is a example of what appears: [url]http://www.flickr.com/photos/63259070@N06/6449175293[/url] as you …

Member Avatar for hfx642
0
217
Member Avatar for mwjones

I'm having trouble writing binary data out to a file. My end goal is to add a chunk to a PNG file; which has a format of: length (4 bytes), type (4 bytes), data (lots of bytes), crc32 (4 bytes). Collecting each of these pieces is not a problem, but …

Member Avatar for woooee
0
226
Member Avatar for sushlet

[CODE] ifstream in_gradebook; ofstream out_gradebook; in_gradebook.open("gradeBook.txt"); out_gradebook.open("gradeBook_edit.txt"); while (???) //while int is being read { in_gradebook >> score; out_gradebook << score << " "; sum = sum + score; } average = sum / 10.0; out_gradebook << average << endl;[/CODE] Here is a small snippet of the code I have …

Member Avatar for sushlet
0
242
Member Avatar for vjames

Is it possible to write to an existing text file in a jar. I managed to read from it with getResource() but I am stuck trying to write to it, it gives me a file not found exception. Thanks

Member Avatar for vjames
0
1K
Member Avatar for javaNooblet

Hi All, I am currently trying to figure out to finish this project. Below is my code that I have so far. There are some blank methods that I am not sure where to even begin on how to complete them. I have a description of what the methods should …

Member Avatar for NormR1
0
2K
Member Avatar for iamthesgt

In writing a logging program for a SDK Engine, I have come across some problems. The logging function works fine when called with test programs, but when I run it in a full test of the SDK Engine, no file is ever created. I added some testing lines to make …

Member Avatar for iamthesgt
0
395
Member Avatar for Uni

From a text file, i should get the necessary information in order to create a beat map, a representation of what we see in music sheets, from this text file: [CODE]3 measures 3 4 time signature 4 beats 4 note, measure 1 3 note, measure 1 1R rest, measure 1 …

Member Avatar for YAMNA MIDHAT
0
171
Member Avatar for iamthesgt

I am writing a program that writes log entries to an external text file and returns them upon request. When called, the return function should output the log entries between two user- submitted dates or outputs the last 100kb of the file if that's what's requested. The logfile stores each …

Member Avatar for raptr_dflo
0
195
Member Avatar for pi_lord12

Hey guys, I'm working on a project to use Huffman trees to compress a text file into binary. For instance, based on the frequency of the characters in a string like "aardvark", a - 3 r - 2 d - 1 v - 1 k - 1, compression using a …

Member Avatar for pi_lord12
0
214
Member Avatar for jeffrey o

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 …

Member Avatar for javaAddict
0
203
Member Avatar for Nathan Campos

Hello, My friend gave me a code to try a bit. What it does is that it gets a text and format it. Here it is: [code]function boldAndItalicize(text) { return text.replace(/&/g, '&').replace(/</g, '<') .replace(/(\*+)([^*]{1,1024})(\*+)/g, function (whole, open, content, close) { if (open.length === close.length) { switch (open.length) { case 1: …

Member Avatar for twiss
0
117
Member Avatar for terabyte
Member Avatar for flowerzink

Hello guys! I'm having a rather pesky problem working with fstream. I could write, for example: [CODE]fstream file("text.txt");[/CODE] then file should be open in read/write mode. But then if I do the following: [CODE]file << "Some text"; file >> string_var;[/CODE] or in the opposite order, it will only perform the …

Member Avatar for Ancient Dragon
0
162
Member Avatar for Juan-Ellyn

Hi I need help on this please.I have to write a void function that reads data from the following file:5 2 2 670.60 6 4 2 890.80 2 2 0 220.00 10 8 1 1340.60 10 4 3 1430.70 4 0 0 460.30 5 3 1 700.00 7 5 2 …

Member Avatar for Juan-Ellyn
0
168
Member Avatar for mmmerlin

Hi, I'm writing a scientific application that has to store a large (1GB to 500GB+) amount of data on a hard drive, and then, once written, read it back sequentially to process it. The amount of data for a particular experiment is known in advance, exact to the byte. When …

Member Avatar for mmmerlin
0
497
Member Avatar for Democles

Hello, I am more experienced with Java and trying to write a script for a server I have. I need to learn Python anyway, so I am attempting to do it in python. I am not completely lost, but just puzzled why it would do this. Here is the code …

Member Avatar for Democles
0
262
Member Avatar for jasleen12345

i have the following code...according to my book both the files should open...but it opens both the files...writes into them....but when i open them for reading....only one opens up....pls see where i am wrong....[CODE] #include<iostream> #include<fstream> using namespace std; int main() { ofstream fout; fout.open("country.txt"); fout<<"United States of America\n"; fout<<"United …

Member Avatar for jasleen12345
0
170
Member Avatar for peterwalter

THis is what I need to do...I need help with the third point [INDENT]1. Write a class OrderedList. The implementation of OrderedList must be as a linked list of Comparable elements. The list items are maintained in ascending order at all times. On this assignment, no indexing methods are allowed. …

Member Avatar for helpmehelpme
0
251
Member Avatar for rothn

When my code (below) is executed, a error message is triggered which says "The operation completed successfully." To give this some context, hFileMap is valid; I have checked this with my debugger, and other operations can easily be performed correctly on this handle that yield correct results. The only weird …

Member Avatar for vijayan121
0
1K
Member Avatar for Magic_Turtle

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 …

Member Avatar for sudeepjd
0
730
Member Avatar for codingNewB

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 …

Member Avatar for codingNewB
0
752
Member Avatar for Agent-of-Chaos

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 …

Member Avatar for gerard4143
0
170
Member Avatar for neoraghav

Hi, I want to create a log file that captures all the actions happening...anyway i got code for that from internet. Now what i want to do is, make that [COLOR="Red"][U][B]file read only[/B][/U][/COLOR] so that the data is not modified by external application or user. [code=c++]log(char* msg) { time_t now …

Member Avatar for neoraghav
0
2K

The End.