224 Topics
|
|
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 … |
|
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> … |
|
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 … |
|
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 … |
|
hi, does any one know about the pipe & filter architecture implemntation in C# have a question in that. |
|
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 |
|
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 … |
|
i have to read a verilog file in c ..how will be the code in general? |
|
|
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 … |
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 … |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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. … |
|
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 … |
|
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 … |
|
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)) == … |
|
hello im new in java and i have to do simple program and can read from txt file |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.