75 Topics

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 subhraakasuny

Hi Team, I have an excel which has multiple rows and each row can have multiple images associated with that , which are postioned on a specific cells of that particular row.I know while we are positioning a image on top of a cell, that is not associated with the …

Member Avatar for orichisonic
2
1K
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
275
Member Avatar for bananacat

Hi. I'm using 3 classes: the Character class, the Scanner class, and the Test class. This is the Character class: public class Character { private char cargo = '\u0007'; private String sourceText = ""; private int sourceIndex = 0; private int lineIndex = 0; private int columnIndex = 0; public …

Member Avatar for rproffitt
0
344
Member Avatar for Hopp3r

So I've come across a problem more than once and it'd be a ton of help if I could get this figured out! So there are several instances where I've wanted to open a file with notepad or notepad++ to change values or something (mainly with videogames). The problem that …

Member Avatar for gerbil
0
488
Member Avatar for elouch

Hi everyone, i've been searching on the internet about how to read contacts from windows live mail account and i cant see anything in the internet to solve such problem. can anyone help me with this, a pointer or tutorial for this may do. thanks in advance.

Member Avatar for elouch
0
238
Member Avatar for Emma_3

I'm supposed to just read a file and display certain information. I wrote the file in notepad and have it in the correct folder for my project, but when it opens (it DOES open), it doesn't display anything. Ideas? #include <iostream> #include <fstream> using std::cout; using std::cin; using std::ifstream; int …

Member Avatar for Moschops
0
274
Member Avatar for Goffy

Hello im making this xml reader that outputs links to listbox, the xml code is like this. <item> <title>file1</title> <category>myfiles</category> <link>http://google.com</link> </item> <item> <title>file2</title> <category>myfiles</category> <link>http://yahoo.com</link> </item> My code looks like this, it works but i would like that i could click the File1 in listbox and it would work …

Member Avatar for Goffy
0
267
Member Avatar for blue_Student

I don't know what's wrong but the succeeding strings are not properly read by fgets. else { initArray(word1); //first string fgets(word1, 29, fileIn); printf("word1: %s\n", word1); len = strlen(word1); if(word1[len-1] == '\n') word1[len-1] = '\0'; while(!feof(fileIn)) { //succeeding strings in next line initArray(word1); fgets(word1, 30, fileIn); printf("word1: %s\n", word1); len …

Member Avatar for Ancient Dragon
0
282
Member Avatar for CJMW

So im making an RPG. For collision detection, I thought I would do it like this: 1. Read text file containing collision data. 2. Iterate through the list using nested for loops. 3. When a value of 1 occurs (denoting an inpassable tile) add a rectangle to list 'badTiles', where …

Member Avatar for CJMW
0
410
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
372
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
681
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
329
Member Avatar for dirtydit27

Hello, I'm having a little trouble with a some code that I'm writing for homework. Basically, I'm taking two files that contain numbers and merging the contents into another file. The files do not have the same amount of numbers in them (one might contain 7 while the other contains …

Member Avatar for aakash121
0
406
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
374
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
298
Member Avatar for blackrainbowhu

Hello! I'm new here, and I need some help. :) I am working on a program that has to write and read a binary file. I have to add lectures to it, they look like: **COURSECODE;COURSENAME;MAXAPPLICANTS;ACTUALAPPLICANTS;** I could write that in a file without any problems using `char*`. My question …

Member Avatar for Banfa
0
422
Member Avatar for efxee

I am trying to read a structure from a .dat file...the first integer to be read is the no of readings, then there is the data in following structure format struct Oven { int rec_no; int temp; int status; char string[10]; }; below is the method through which I read …

Member Avatar for Ancient Dragon
0
2K
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
332
Member Avatar for Doogledude123

Im reading a text file and storing the characters in an array. I get a "Unhandled exception at 0x0109985e in Executable.exe: 0xC0000005: Access violation writing location 0xcccccccc." void drawMap(string MapLoc) { int i = 0; int x = 0; int y = 0; char* arrayMap[5225]; ifstream mapReader; mapReader.open(MapLoc); for (i …

Member Avatar for Doogledude123
0
278
Member Avatar for Doogledude123

void drawMap(std::string MapLoc) { char* gridMap[95] [55]; ifstream Map(MapLoc, ifstream::in, ifstream::binary); while (Map.good()) { for(int i = 0; i < 95; i++) { for(int j = 0; j < 55; j++) { if (gridMap[i] [j] == "X") { //Draw Wall glColor4ub(255,255,255,255); glBegin(GL_QUADS); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glEnd(); } else if …

Member Avatar for Doogledude123
0
694
Member Avatar for Dee1004

Hello guys! I need some help... I'm new in Java programming and I'm dealing with in issue. I'm at a step of my project that keeps stoping me from going further. I have some xml files that contains diacritics and I need to read them and extract the tag's that …

Member Avatar for rubberman
0
430
Member Avatar for woah123

I'm given a text document with marks and course codes, and I need to create a function where you input the directory of the file, and the course code. Doing so, the code will return the average mark of all the marks in the text with that course code. Any …

Member Avatar for woah123
0
203
Member Avatar for reedone816

hi, if anyone can help me? I have problem with windows live mail. the preview pane show different email with the selected email I click in message list pane. It is not happened to all the message but some do. this is happened just recently, I didnt have this problem …

0
251
Member Avatar for gcclinux

Gents as you can see I have done great progress in getting the last line and the line beforelast working and spliting but I am stuck now as I need to the beforethat (3rd) line from last also included and I can't figure it out, everything i do fails to …

Member Avatar for Taywin
0
262
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
358
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
715
Member Avatar for Prisms

Hello everyone I'm having a bit of trouble with C. Its been awhile and I was wondering if I'm on the right track I'm trying to read from a file and manipulate the data with a structure I created. The problem is the first two values in the text document …

Member Avatar for WaltP
0
406
Member Avatar for nchy13

i am getting weird result here. if condition at line 25 is satisfied only 4 times while reading cpuinfo but **cores** is modified each time while loop iterates. i am not able to think of anything that may cause this. any help of any sort is appreciated. #include <stdio.h> #include …

Member Avatar for nchy13
0
346

The End.