17 Solved Topics

Remove Filter
Member Avatar for
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
371
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 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
397
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
216
Member Avatar for terabyte
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
263
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
754
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
Member Avatar for ms_farenheit1

I am working on an application and would like to be able to calculate the efficiency of various algorithms and choose the best one. The application operates on a list of records that are stored in a file. Operations include adding records, deleting records, and searching for records based on …

Member Avatar for Ancient Dragon
0
145
Member Avatar for dinkpwns

Hello everyone, I currently have an application that reads in an entire excel file then iterates through the records from the file and queries our database for a match. If a match is found the record is ignored if a match is not found the record gets added to the …

Member Avatar for dinkpwns
0
157
Member Avatar for idlackage

I'm reading in a text file that contains a little custom script. However, one line of that script gets ignored and I can't figure out why. Script: [CODE]# Test Case #1 - Simple Movement RESET FORWARD 2 PAUSE 1 REVERSE 2 PAUSE 2 TURNRIGHT 2 PAUSE 1 TURNLEFT 2 PAUSE …

Member Avatar for Radical Edward
0
96
Member Avatar for ktsangop

Hello everyone! I am using python 2.6 on cygwin environment and wondering how could i prevent two python processes from writing to a file at the same time. The file that is shared between the python processes is an ini file and is accessed through ConfigObj module. The first python …

Member Avatar for ktsangop
0
373
Member Avatar for techie1991

Hello, I was trying to implement data structures using file operations. I am using a data structure of two integers, one being the index number and other being the value. My actual aim is to recreate the file containing the data using a log. But, the program isn't running as …

Member Avatar for WaltP
0
454
Member Avatar for xxunknown321

how do i read in files from a ".txt" file into a linked list heres my code. [CODE] import java.io.*; public class LinkedList1 { class Node { String element; // list element Node next; // successor link Node(String el, Node n) { element = el; next = n; } Node(String …

Member Avatar for BestJewSinceJC
0
190
Member Avatar for chromatinpt

Hi all, I need to store some data in a txt file from a textbox.text. I have try this and works: [code] FileInfo t = new FileInfo("data.txt"); StreamWriter Txt =t.CreateText(); Txt.WriteLine(textbox1.text); Txt.Close(); [/code] But.... How can I create multiple files without delete the older one, e.g., Gives the name to …

Member Avatar for chromatinpt
1
174

The End.