General C++ Programming - July 2011 (Page 28)

please c++ help: my program has a fault
 
thanks
[8 replies] Last: OP, please don't delete your posts. Now no-one else can benefit from t... (by anonymous23323124)
by LB
Open fstream with write, without clearing file
 
I have a serious problem here: I need to open a file and overwrite existing data in the file. I cannot load the file into memory (the files being dealt with her...
[16 replies] Last: It was my project - somehow recompiling everything fixed the problem. ... (by LB)
by ramako
Calling constructor explicitly in copy constructor
 
Hi, I do know this can be done with the destructor (X::~();), but it does not seems to work with the constructor. I do not want to repeat the code of the con...
[2 replies] Last: This currently only works for members. C++0x supports delegating const... (by Athar)
by chulio
help me with simple questions
 
Hello World, i have to 2 questions: 1) i have a program which i want to execute it to a computer but i dont want to compile it but just only to run it. What i...
[5 replies] Last: Thanks for the replies. Very useful informations. :) (by chulio)
sudoku
 
i want to make a sudoku..which is a game..can anyone tell me how to start? i mean i ll have to save the game as well that means i ll be using files so whats th...
[3 replies] Last: Have you done any work on it yet? Are you going graphical? What's your... (by ultifinitus)
how to write your own compiler in c++?
 
I want to write my own compiler in c++ for my own language with borland builder. How to do it?
[1 reply] : google Dragon Book Though it isn't easy unless your language is very ... (by hamsterman)
Can't make std::pair with std::auto_ptr as a member type with gcc
 
Here is a snippet representing my problem: int main(void) { std::pair<std::auto_ptr<int>, int> x (std::auto_ptr<int> j(new int(0)), 2); return 0; };...
[1 reply] : Yes, the problem is that the auto_ptr copy constructor takes a non co... (by m4ster r0shi)
by holtaf
wtf?!
 
Hi guys! I have this simple code #include <iostream> using namespace std; int main() { for( float f = -0.8f; f <= 0.8f; f+=0.04...
[2 replies] Last: Yes, and as such, floating point arithmetic is subject to error. floa... (by anonymous23323124)
set_symmetric_difference with map holders
 
I want to do the symmetric difference between two sets, each represented by a map. I also using a mex function so it can be handled in matlab. It is read by th...
[1 reply] : The key values for map are const, since you should not change them (th... (by exiledAussie)
Help Needed With My Custom Iterator
 
I've created a custom test iterator structure that iterates through a pre-defined array for testing purposes. However, as with all projects, somethings never go...
[2 replies] Last: I figured it out. Thanks for you help, Ne555. Wazzak ... (by closed account zb0S216C)
singleton question
 
I never really understood singletons but I think I've got it. The static initialization allows for only 'one' instance to exist. because static parts of cla...
[2 replies] Last: thank you. (by closed account zwA4jE8b)
c++ help please
 
thanks
[2 replies] Last: thanks (by exmlash007)
by ty98
Dialog Builder
 
I'v looked everyware for a dialog builder but a just can't fined one. other then resource builder.
[8 replies] Last: We've got to VC10 now ^^ If the installer genuinely won't work, perhap... (by anonymous23323124)
how to define more in c++?
 
you can define one variable for ex. #define shoutx cout. But if you write for ex. #define kint int. Or #define LNUMBER CALLBACK. Compiler show error. How to def...
[12 replies] Last: Sheesh, yes. No I feel myself like an idiot. (by HenriK)
by crypto
Need help with a file save
 
So the intention of this project was to basically play around with command prompt commands, however it seems that I've run into a file error. The program use...
[2 replies] Last: I'm not familiar with that, I'm guessing I'd do this? //precompiler... (by crypto)
Help with a Trim Function
 
Okay basically i need some help with a trim function with char*. There is a random newline character in some c style strings that is screwing up things like str...
[4 replies] Last: Thanks i'll try creating a string and then using c_str() and see where... (by darkhorse)
by ramako
EOF on binary files
 
As far as I know, binary files doesn't exactly have an EOF, right? How can I find the end of a binary file?
[7 replies] Last: I never said that the EOF was in the file, just that they do have an E... (by LB)
Is this bad singleton design?
 
I'm writing a simple 3D Game engine with SFML and OpenGL. I have managers like ResourceManager, StateManager, etc, and all of them are Singletons so I can acce...
[7 replies] Last: Right... that's what I thought. I'd argue that's a poor use of a Sing... (by Disch)
Function returns "0" from a simple division calculation
 
I know this is a simple problem, but I have a function that will not return a double or float value from a simple calculation...for example: double r = (3 / 50...
[4 replies] Last: I see...thanks that worked... (by paulmcco)
Vector index from vector iterator
 
Hi Is it possible to determine the vector index from the iterator which the find() function return in the code below.. #include <iostream> #include <...
[2 replies] Last: @Athar Thanks a lot. Its very helpful to me. (by dearvivekkumar)
July 2011 Pages: 1... 2627282930
  Archived months: [jun2011] [aug2011]

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