22 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for existinglady

hello, can someone help me, when I put the codes from my book and edited them to use filestream, I encounter an error #include <iostream> #include <fstream> #include <string> using namespace std; struct nodeType { string info; nodeType *link; }; int main() { nodeType *head = NULL; nodeType *newNode; nodeType …

Member Avatar for Roy_264
0
6K
Member Avatar for munitjsr2

[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to …

Member Avatar for AssertNull
0
3K
Member Avatar for JohnMcPherson

Hello, this is a very strange problem. I had first put this discussion in the Linux and Unix thread, since I believe it is actually a problem with how the data is entered via but the vi editor, but I closed those out and will put it in the C …

Member Avatar for Nutster
0
276
Member Avatar for CJMW

So, Im making a game in c# using Xna. I have a function that will read a text file and display a map on screen, using numbers in the file as texture references. The file is a integer multidimensional array. I have another file which is used to set collision …

Member Avatar for CJMW
0
383
Member Avatar for beastie805

I need help reading a bool function from my HW assignment, I am not asking you to do complete my assignment for me. All I need help with is reading my bool function in main. Thank you for looking #include<iostream> #include<fstream> #include<string> using namespace std; struct StudentType {string studentName; int …

Member Avatar for beastie805
0
682
Member Avatar for YumnaZia

This is my program for a notepad! I am getting error at the part where I'm trying to extract the text from another .txt file!! I used the method realLine() but it only reads one line!! I want to know what other methods can I use here to extract the …

Member Avatar for YumnaZia
0
332
Member Avatar for siddiquedu

3 years ago, one brother solved this problem, i need this program to make some calculation. actually, i have some fractional/decimal component t (like 2.0213, 3.047) this program can only take integer. Can anybody please help me !!! #include<iostream> #include<fstream> #include<string> #include<cstdlib> #include<cmath> #include<iomanip> #include <windows.h> using namespace std; //void …

Member Avatar for siddiquedu
0
376
Member Avatar for die_raupe2

I got this snippet of code from a larger program I've been writing and I'm stuck. All I'm trying to do is read from a file line by line but I keep picking up the new line character, at least that's what I think it is. #include <stdlib.h> #include <stdio.h> …

Member Avatar for die_raupe2
0
299
Member Avatar for replic

Hello everyone, i am fairly new to shell scripting so please bear with me. The following script is supposed to read words from a file and depending on the word print different things. However it always prints the default value. It also refuses to work completely if the first line …

Member Avatar for replic
0
333
Member Avatar for branding4you

Hi I read a text file using PHP, the file gets uplaoded, and what I want to do is read the file take some information out of it and post it to mysql. Problem is that when reading the file it removes the spaces, I cannot count where the data …

Member Avatar for branding4you
0
359
Member Avatar for Alexkid

Hi There, I need to re-write any mention of .tellg() in my code as the function is not supported on the desired hardware. I have the following lines of code: getline(file,line); { std::istringstream stream(line); stream >> first >> second >> third >> forth; UINT32 file_pos = stream.tellg(); file_pos++; fifth = …

Member Avatar for vijayan121
0
726
Member Avatar for yazz110

Hi Everyone, Starting to write **3D images** using** JOGL **and I can't seem to find any **recent information** and help about **JOGL** and creation. I noticed that most of the terms have changed and it doesn't work. Any **recommendations** on what I could read to help update me and keep …

Member Avatar for yazz110
0
251
Member Avatar for BeeKeeper18

Right guys, I'm really new to this but I'm getting along ok, but I've hit a block. I need to be able to know how to search a text file in VB for a particular line and then display it. the files I'm trying to use are set up as: …

Member Avatar for BeeKeeper18
0
3K
Member Avatar for Tobyjug2222

Hello, I'm currently making a program in Visual Basic 2010 for my Course work, and I'm struggling a little as it involves a "log-in system." The system will save the Users Information in a folder (Called UserInfo.txt) (Address, Password, Email etc..), and the folder name being the username of the …

Member Avatar for berniefitz
0
955
Member Avatar for Ahmed2

Hello there, submissiontime length finishtime remainingtime 1031 17:11 574.1025391 MB 1050 17:30 1 1326 22:06 536.0175781 MB 1343 22:23 2 2721 45:21:00 608.1279297 MB 2741 45:41:00 3 32 0:32 575.8115234 MB 51 0:51 4 1161 19:21 652.6259766 MB 1182 19:42 5 937 15:37 288.7597656 MB 946 15:46 6 3087 51:27:00 …

Member Avatar for Ahmed2
0
315
Member Avatar for Wolxhound90

Hey all, I'm trying to do a project which involves reading the text from a number of textboxes and putting it into a string. I'm just wondering if there's an easier way to it other than: [CODE]CreateString += TextBox1.Text + TextBox2.Text + TextBox3.Text... (etc)[/CODE] I have thought about creating a …

Member Avatar for codeorder
0
809
Member Avatar for xxunknown321

How do i get my program to read the last ten lines of the ".txt" file? Can you please dumb it down as much as possible. Here is what i have so far: // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () …

Member Avatar for usustarr
0
8K
Member Avatar for r0n

hello everyone, got issue regarding reading duplicate records in a text file... i need to read the file and look for any duplicates data/keys in the text file and write them to another file (all the duplicates records)... how can i do that, in looping...:-/ any help...:) thanks!

Member Avatar for r0n
0
2K
Member Avatar for Firo

Mhm, so, the problem I'm having here is that, once the "while (!boatList.eof())" cycle reads the first line (EDIT: I meant, how should I put it, the first "segment"), it goes on infinite (?) loop reading the other one. [QUOTE]AX 777 Valtis 0 4 500 2007 5.5 -1 50.2 6 …

Member Avatar for Fbody
0
177
Member Avatar for Sunshineserene

Hi, I have a problem with my instance. I need to do a file read to extract all the numbers in the text file. However, when reading the file, I used String, and hence the file is read as a String. Later on I need to equate the output of …

Member Avatar for vasu d
0
403
Member Avatar for redZERO

Hi everyone I have a project that I have created in Netbeans. I would like to deploy it as a JAR file, so i have "build"'ed it and I have a jar which runs nicely in the /dist folder. Problem is, the program in question requires reading from and writing …

Member Avatar for NormR1
0
2K
Member Avatar for avarionist

I'm working on a simple function to read in from a file called save.txt and i need to read about 7 or 8 characters in. 4 characters are numbers that represent North south east and west respectively the other 4 characters are delimiters(i don't know why i put them in …

Member Avatar for avarionist
0
152

The End.