51 Topics

Member Avatar for
Member Avatar for Lemony Lime

I've done some searching, and it seems a few people have asked similar questions, but none of them were quite what I was looking for. I need to be able to read lines of code from a .txt file, and then execute them in Java. Or, if that's impossible, would …

Member Avatar for NormR1
0
3K
Member Avatar for Kitson

Hi guys, First post so please don't be too harsh :D. I'm trying to open a .txt file, search for a specific line starting with (" Performance Summary"), copying the first and third numbers in the columns of the 4th line below it and every line below that until there …

Member Avatar for valorien
0
205
Member Avatar for akingcool

Hi, I am trying to make an array to read txt files. I have hard coded it to 3 for the array but I would prefer for it to be able to read the txt files to see how big the array should be. I have implemented some code to …

Member Avatar for akingcool
0
186
Member Avatar for George_91

I've to make several experiments of some algorithms. I want to send those results to a .txt file [CODE] //.... for (count= 1; count<= 20; count++){ //.... std::cout<<exp<<"Time: "<<duration << " seconds" <<'\n'; ofstream f2; f2.open("results.txt", ofstream::out); for(int i=0; i<=20; i++){ f2<<duration<<endl; } f2.close(); } [/CODE] With this code, I …

Member Avatar for MachDelta
0
179
Member Avatar for hari.paartha

[COLOR="Green"]Hi all Pls tell me how i can read a data from EXCEL file and copy it to a text file using c++ program.I dont want to do it as manually .(Its for an extended application for software).I want to read the data from perticular cell to the end of …

Member Avatar for Narue
0
483
Member Avatar for efronefron

I was doing a projecteuler problem. I made a program that would find all the prime numbers under 1000000 and write them all in a file. Why is that if I use the file name as "primes.txt", the result is gibberish from beginning to end, but when I use "primes.dat", …

Member Avatar for NormR1
0
799
Member Avatar for Sturdy

Hi masters, I try to write and read file into txt file but i dont know how to do it. Anyone know how to achieve this? Please help me. any help will appreciated much. Best Regards

Member Avatar for Jx_Man
0
279
Member Avatar for dvidunis

hi, first of all im noob and 11 years old so don't blame me if something is wrong! i try to read a txt, see a version, read a txt on a server, see if on server newer and ask to update if yes. any suggestions? Oh and in C++ …

Member Avatar for \007
0
156
Member Avatar for moose333

Hello I have a txt file with multiple values in six different columns. What I need to do is get each column of data and place them into individual arrays for later use. Also once I have the data I need to convert the arrays into integers. This is the …

Member Avatar for moose333
0
315
Member Avatar for bigdan182

hey guys, im fairly new to this so feel free to tell me if i need to supply more info. basically i need to write code to read in a text file and store different values in different variables, so for example i would read in: bob 1.1 maths 1.2 …

Member Avatar for abhimanipal
0
246
Member Avatar for Usmaan

Hi there, I'd firstly like to thank some of the daniweb members for helping me with my Hangman project. It's finally complete and I have uploaded it on my YouTube. Special thanks to [B]ddanbe, Xcelled194, Mitja Bonca and Momerath[/B]. Right, on to my next project. I'm making a Naughts and …

Member Avatar for ddanbe
0
164
Member Avatar for BirdaoGwra

Hi, It is my code: [CODE]mylist = [['fiss','giss'], ['e','h'], ['d','u'], ['c','t'], ['b','o'], ['a','z']] for alist in mylist: g = ' '.join(alist) print g f = open("write.txt", "w") f.write(g) f.close()[/CODE] How will I write all the words in the txt file. it is only writing the last line of the file. …

Member Avatar for Tommymac501
0
135
Member Avatar for sandwich88

hi everyone this is my first post and yes, im just starting with cpp im using devc++ so i have this homework which i could get done for its due date but still it would really help me to understand more about cpp if i could get it done but …

Member Avatar for sandwich88
0
131
Member Avatar for gayanthi

Hi. I'm relatively new to VB and I have a question that needs an immediate response.Can anybody help me with this.... Suppose a sequential file contains the information shown below. I need help to write a program to use the file and produce a new list where the teams are …

Member Avatar for codeorder
0
175
Member Avatar for ptemedia

I have a number of text files each with 4 pieces of data on each line: name, date, time and comment. I have used $fh to open and read the data and put them in 1 long variable called $AllComments. I then need to sort them by date and time …

Member Avatar for chrishea
0
2K
Member Avatar for wolfeater017

When I finally got the input to work in this code it stopped displaying the txt on the screen. Any suggestions on how to fix this. [code]import pygame, sys from pygame.locals import * import time mo = 0 # set up pygame pygame.init() # set up the window windowSurface = …

0
111
Member Avatar for Ims333

I've searched for two days for a way that when you press a button (In this case button15) that when its pressed, it will retrieve a .txt from online. Basically I need to turn this: [code=c#] DirectoryInfo di = new DirectoryInfo("C:\\"); FileInfo[] rgFiles = di.GetFiles("*.dll"); foreach (FileInfo fi in rgFiles) …

Member Avatar for Lusiphur
0
108
Member Avatar for aliyami90

Hi guys How do I search a file ".txt" which contains three lists side by side for a word , then print the line that the word I searched for is in? NOTE: -The lists are lists of names . it would be beter if you show how to do …

Member Avatar for aliyami90
0
117
Member Avatar for Griff0527

I just started this program a few hours ago, and I am running into an error that I do not understand. I tried finding an answer on Google as well. First off, this is the bare bones of a code right now. I have not started any of the sub-functions …

Member Avatar for Griff0527
0
136
Member Avatar for BoB3R

Hello, I am trying to do a program that is reading for example a.txt file that have 5 lines and i want him to show me for example line #3 only, i know i need to use fgets but i rly dont know how to start it a.txt [CODE]1;27.01.1957;8;12;31;39;43;45; 2;03.02.1957;5;10;11;22;25;27; …

Member Avatar for Dave Sinkula
0
124
Member Avatar for jk8204

my assignment is to retrieve data from a txt file and output how many tests were input, average of all the tests, and then list the letter grade beside each text what i have so far: [CODE] private StreamReader strRead; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs …

Member Avatar for Alxandr
0
243

The End.