General C++ Programming - October 2010 (Page 14)

Reading Data from files in C
 
First, I'm using plain C and can only use plain C for this. Hence why I'm having issues. I want to be able to open a file and read the data from it in lines....
[8 replies] Last: If you try to enter a line more than 50 characters long you'll see why... (by Duthomhas)
Delete Single Entry From Binary File
 
I'm trying to delete a single entry from a binary file, the code I use stored data into a structure that contains 4 fields and then writes it to a binary file. ...
[1 reply] : The easiest way to do this is to write out a new file without the dele... (by PanGalactic)
deleting a line from a text file
 
Is it possible to directly erase a single line from a text file, rather than having to rewrite the whole file omitting that line?
[2 replies] Last: Partially. You can rewrite just the portion of the file that occurs a... (by PanGalactic)
by raz23
keeps on going and going and does not stop
 
How do I get this to stop looping continuously? Seems like it's the same problem for each selection: #include <iostream> #include <iomanip> #include <math.h...
[8 replies] Last: What ended up being wrong? I have the same issue with a similar progra... (by Tytasupra2jz)
input prolem
 
Hey, I was making a '\n' terminated string when I ran into a problem: std::istream& operator >> (std::istream & in, ztring & z) { GlobalFree ((HANDLE)z.buf...
[6 replies] Last: Hello sargon94, [quote=sargon94]As you can see, there is a problem ... (by coder777)
game acceleration
 
hello everyone, I'm trying to make a field runner type game, and im having a hard time making the person accelerate and decelerate. what i want to do is whe...
[4 replies] Last: If you already have an acceleration variable then you could simply giv... (by Galik)
hash_map throws run time exception
 
I am using hash_map<string, Word *> dict to store my Word objects. Each Word is a class that inherits from my Node class. The value in the label variable in the...
[1 reply] : Ana Developer, better post a compilable and runable example. It is ... (by coder777)
Little adivce please with my unbroken/broken assignment please.
 
The program compiles and runs just fine and gives the answers it is suppose to. (as far as I can tell). The problem, however, is that an input of very large num...
[2 replies] Last: If you treat the input as a string, rather than a number, then you won... (by kbw)
How to resolve a template class attribute?
 
Hello everyone, I'm having the following problem: Class A is a template class. Class B has an attribute of type A. Do I have to make B a template class,...
[15 replies] Last: [quote=Squall83]Is boost::variant really able to dynamically resolve a... (by coder777)
brute forcing a monoalphabetic cipher
 
I know there are other better ways to break it like statistical analysis but I was wondering how do I generate the entire keyspace of 26! without having 26 nest...
[4 replies] Last: The permutation register is a vector of indices into V , the set of p... (by Galik)
Multiplying 2d matrices using dynamic mem allocation
 
Hey all. I've been working on this code for a WHILE. I can't figure out what isn't working. Apparently stacked arrays are easier than 2d, but this is what I hav...
[3 replies] Last: aaaah ok I initialized them but didn't set any values. Thanks. (by jhchawk)
std::Vector Segfault
 
I'm trying to populate a vector, which I've done hundred of times in other programs. For some reason I cant' pinpoint, I keep getting a segfault. //Set nu...
[2 replies] Last: Nevermind. The problem was in a different part of my code. I'm just an... (by gagesaber)
Compiling applications with gtksourceviewmm
 
Hey there, I'm trying to compile a simple application using gtksourceviewmm for building a text area with syntax highlighting, but I can't find out which lin...
[no replies]
How does bit field alignment work?
 
Hi all: I encountered this question when i participated a paper test today.So the question is the forgoing title. Two bit field structures occupy the s...
[5 replies] Last: What was the question, what was your answer? I think it's all about th... (by JoR)
by mTy
[C++] Stream
 
Hey, i have a small question. I like to read a executable file with a fstream and store it i a BYTE array. Here my code: #include <string> #include <iostr...
[8 replies] Last: Ok thank you (: (by mTy)
Linear search function
 
Consider a program that is supposed to have an array holding few integers. The program asks the user to enter a number. The program is supposed to go through th...
[2 replies] Last: Make sure you do some reasonable error checking while receiving the in... (by kempofighter)
how can you send the name of a variable as a parameter?
 
I'm experimenting writing functions which use new and delete on passed pointers, but the function which allocates writes to a text file which file and line the ...
[2 replies] Last: Although it doesn't appear in the standard, the preprocessor often pro... (by kbw)
Why Function Overloading does not depend on the return type?
 
Why Function Overloading does not depend on the return type?
[3 replies] Last: k thanks i got it (by saikumar029)
can u send me c++ & Data Structure interview question
 
can u send me c++ & Data Structure interview question to this mail id saikumar029@gamil.com
[no replies]
cant fix the problem!!!!
 
hey guys. this is the code ive got so far but the thing is when i input 10+ it displays 123456789101112 ... but the output should be 123456789012... how do i ...
[2 replies] Last: lol thank you so much (by lothrodel)
October 2010 Pages: 1... 1213141516... 23
  Archived months: [sep2010] [nov2010]

This is an archived page. To post a new message, go to the current page.