224 Topics

Member Avatar for
Member Avatar for razorsky

After much searching I cannot find a particular way to get a datafile into my structure. I understand how to create and manipulate the structure. C does not play nicely with strings is another thing I have noticed. I have tried many examples of how to do this but none …

Member Avatar for j.c.
0
9K
Member Avatar for jakub.peciak

Hi, I have a XML file: <?xml version="1.0" encoding="ISO-8859-1"?> <Report> <config repstarttime="" rependtime=""></config> <cashdrops></cashdrops> <cashsheets></cashsheets> <cspdata></cspdata> <fdremdata> <fdrementry ENTRYID=""></fdrementry> </fdremdata> <SHIFTDATA> <SHIFT_CD_Index ShiftSystemIndex="1" Shift_CD_Used="1" ></SHIFT_CD_Index> <SHIFT_CD_Index ShiftSystemIndex="2" Shift_CD_Used="1" ></SHIFT_CD_Index> <SHIFT_CD_Index ShiftSystemIndex="3" Shift_CD_Used="1" ></SHIFT_CD_Index> <SHIFT_CD_Index ShiftSystemIndex="4" Shift_CD_Used="1" ></SHIFT_CD_Index> </SHIFTDATA> <Order> <OrderHead filelocation="" filesuccess="TRUE" Attendant=""></OrderHead> <NFC1DATA nfc1count="0"></NFC1DATA> <PAYMENTDATA paymentcount="1"> <payentrydata id="1"></payentrydata> </PAYMENTDATA> …

Member Avatar for jakub.peciak
0
397
Member Avatar for DelilahDemented

My program will process the first and second line of the text file but gets a bit crazy after that. Lines 1, 2, 3, and 5 are supposed to match and line 4 does not. It gets lines 1 and 2 but 3 and 5 are incorrect and it processes …

Member Avatar for DelilahDemented
0
176
Member Avatar for linezero

I have code in a txt file public class TestClass { static void main(String[] args) { int id; int number; id = 3; number = 33 telNo = id int id; } } I know how to read the file using bufferedreader and get the line number but i would …

Member Avatar for JamesCherrill
0
301
Member Avatar for anisha.silva

hi, does any one know about the pipe & filter architecture implemntation in C# have a question in that.

Member Avatar for anisha.silva
0
225
Member Avatar for anisha.silva

HI, I want to implemtna a file & filter architecture for reading data from a txt file and then removing the non alpahbatical words in it and display the 20 words in alphabatical order in the Consol window. how do i do it. appreciate a reply, thanks

Member Avatar for nmaillet
0
583
Member Avatar for maurya10

Here is the c code:- #include<stdio.h> #include<stdlib.h> #include<string.h> int main(int argc,char *argv[]){ if(argc==1){ //default printf("first version\n"); int i,j,k; char line[1024],*str1,*str,str2[1024],ch; FILE *in=fopen("/proc/cpuinfo","r"); i=0; while((fgets(line,1024,in))!=NULL){ // printf("%s",line); str=strtok(line, " :"); if(str!=NULL){ //point 1 if(strcmp(str,"model")==0){ printf("%d %s\n",i,str); //point 2 str=strtok(NULL, " :"); printf("%s\n",str); //printing "name" if(strcmp(str,"name")==0) //point 3 printf("CPU Model:=%s\n",strtok(NULL,":")); } else …

Member Avatar for maurya10
0
277
Member Avatar for milon.mahapatra
Member Avatar for stevenjs

Greetings, Came across this intriguing web site offering a free "advance review copy" of a novel in exchange for a review of the book. I'd like to recommend it to you all. See [nineinchbride.com](http://nineinchbride.com). I have no idea when this offer will end, but this is a good smart read …

Member Avatar for stevenjs
-2
224
Member Avatar for dawsonrose

Hello, I've a file which contains names and grades of students, and I'd like to write a program which can sort their grades (like midterm 1,midterm 2) according to user choice. I wrote as far as the choice part and opening the file, yet I don't know how to make …

Member Avatar for WaltP
0
772
Member Avatar for zxc123

I have a form with a textbox and I want that textbox to read from text file ,manipulate information in text file and write it to another text file. read each line and when see -- into line break and continue next line until to file end.this code have problem …

Member Avatar for k1robert
0
435
Member Avatar for MasterHacker110

I am writing a chatbot and it's database is going to be contained in a .txt file. Now i have this code: #include <iostream> #include <string> #include <fstream> using namespace std; int main() { string line; string uinput, resp; char key = line[0]; ifstream file("t.txt"); cout<<": "; getline(cin, line); while(getline(file, …

Member Avatar for MasterHacker110
0
203
Member Avatar for deshazer.jad

I'm trying to load a PNG file into a BufferedImage like so: BufferedImage image = ImageIO.read(new File("smile.png")); When I use this line of code alone, it produes the error: Unhandled Exception Type IOException... I can fix this by surrounding the statement with try/catch like so: BufferedImage image = null; try …

Member Avatar for deshazer.jad
0
821
Member Avatar for Archuom

I have a file info.txt like below NAME ID=karan PLACE=Mumbai AGE=23- PHONE=1234 HANDICAP=No- OCCUPATION=Student NAME ID=Ravi PLACE=Goa AGE=25- PHONE=4567 HANDICAP=Yes- OCCUPATION=Employee I want to read the file with make them into record strings as below "NAME ID=karan PLACE=Mumbai AGE=23 PHONE=1234 HANDICAP=No OCCUPATION=Student" "NAME ID=Ravi PLACE=Goa AGE=25 PHONE=4567 HANDICAP=Yes OCCUPATION=Employee" Please …

Member Avatar for Lucaci Andrew
0
909
Member Avatar for valestrom

I'm working on a simple updater program that gets text from a file called version.dv that will always have a number in the form of 1.00, 1.15, 2.00 I can't figure out how to get it to read the file and save the text to a string though. Here's what …

Member Avatar for Mitja Bonca
0
207
Member Avatar for srg85

I have a data set in .txt format and want to do some arithmetic operation on the data set using C code. How to do the job? I want to make the text data into a 2D-array. The data set is like this: 1st col - year, 2nd col-January rainfall, …

Member Avatar for mridul.ahuja
0
2K
Member Avatar for TedOlga

Dear All Please share your thoughts and ideas!!! I have thousands of files (.txt) which I have to parse and get bits out of them (e.g. 5th bit of each file is 0|1?).Anyway of dealing such lot files to analysis ??? int main(int argc, const char* argv[]) { for (int …

Member Avatar for Labdabeta
0
150
Member Avatar for Humayoon Khan

i know how to read a file into array, however i want to perform some search operations which is difficult to do on array. if someway i am able to read a file to string then it becomes easier. i have 2 methods of reading a file into wstring but …

Member Avatar for Humayoon Khan
0
3K
Member Avatar for rannamaa

Im making a program in wich I need to monitore (import) a variable (number from an other program window every time the variable changes. There are very much other information in this window but I only want this number that is occuring at a sertain position in the window. How …

Member Avatar for triumphost
0
160
Member Avatar for EPerminas

Hello everyone, for example, I have name.txt file. It contains three lines of text (see below): *Roses are red% Sky is blue% JAVA is cool%* All lines ended with % symbol. I need to count how many every line have characters and which character is repeated max and min times. …

Member Avatar for JamesCherrill
0
371
Member Avatar for stephenhawkings

Hi, i want to read each of the 4 columns stored in a .txt file separated by a space into an array of their own. The text file may have hundreds of rows so reading until the end of file is desirable. Example: 3.4407280e+003 6.0117545e+003 8.0132664e+002 2.5292922e+003 3.4163843e+003 5.9879421e+003 7.7792044e+002 …

Member Avatar for Ancient Dragon
0
244
Member Avatar for dinosaur123

Hello, I am having trouble with a program I am writing. The problem is that I need to take information from a text file, read it, and then output the information into another text file. I keep getting this output: > <ProductSummary>0015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A00015D7A0 </ProductSummary> I need it to output something like …

Member Avatar for VernonDozier
0
400
Member Avatar for hwoarang69

trying to create fifo that can read and write. but some reason its not going below "O_RDONLY" line. any thoughts? char *fifo_name = "fifo"; #define 0666 int main() { int fd1; int fd2; //create fifo if(mkfifo(fifo_name,FIFO_MODE) == -1) { exit(1); } //open fifo for read if((fd1 = open(fifo_name, O_RDONLY)) == …

Member Avatar for hwoarang69
0
153
Member Avatar for ct_hunny
Member Avatar for jdevin1

I am trying to create a sort of code library in visual studio 2010 where the form displays a list box of certain project files in vb that i have made in the past and when selected, a button can be pressed that launches the .exe files of those visual …

0
121
Member Avatar for JavaLearners123

Hello, I'm in my first year in software development program and need help with the following program. I've spent hours working on it. Any help is greatly appreciated. Write a java program that will open a file, read each of the records from the file, use that data to populate …

Member Avatar for NormR1
0
224
Member Avatar for chrlop

Hi I was ask to do a code in c wich read the contenent inside a txt file and display it then after display it they wan't me to tokenize those command and interpretate them in c. I have no experience in c if someone can show me how to …

Member Avatar for chrlop
0
886
Member Avatar for masterinex

Hello, I am trying to write a simple program which should read the first line from the file s1, and display it. When I run it , I get the message cannot implicitly convert 'System.IO.Streamreader 'to 's1.Program' which happens for the line Program re = new StreamReader("s1.txt"); using System; using …

Member Avatar for Momerath
0
254
Member Avatar for NavVet

OK, I'm new to VB.Net so forgive me if this was covered else where and my search foo was week. I am trying to read data from a text file which is updated regularly by another program. I only want to read the new data which will then be passed …

Member Avatar for Mitja Bonca
0
257
Member Avatar for CimmerianX

So, I am a novice with python. I'm trying to teach myself python just to expand my skills. I gave myself a simple challenge and I need some guidance here on how to get it done. The goal is to read in a dhcpd leases file, read through the lease …

Member Avatar for TrustyTony
0
943

The End.