75 Topics
| |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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> … |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … |
The End.