General C++ Programming - August 2011 (Page 18)

G++ STL: allocators hell
 
Hi everybody, I have a simple question. I'm using G++ 4.5 and try to provide a custom allocator to a std::set but I can't get my code to compile. Everything wo...
[1 reply] : OK no worries... I got to learn how to read a man... the second argume... (by soft0613)
Dividing Variables into "bins" (1,2,3)
 
Hello! I'm making a program that creates stars called "gravitars" and calculates their slowing frequency over a number of years. All of that is done! The pro...
[55 replies] Last: if (f<min) index=0; else if (f>=max) index=bucket_count-1; e... (by helios)
by Timus
Problem with double
 
Can anyone tell me why this code return 28 : double x = 0.29; int y = x * 100; return y; What the reason of this problem?
[1 reply] : Rounding errors... If you want the sum rounded to the nearest int, ho... (by andywestken)
passing an ifstream argument to a function
 
hi, I want to open a file within a function, so I passed the function an ifstream parameter and the relevant code is: string test(ifstream& in , vector<str...
[2 replies] Last: so how do I write it correctly so that it reads the lines(i.e. string ... (by itcplpl)
Basic permutations question
 
This is where I'm starting with... http://www.talkstats.com/showthread.php/19394-Real-life-stats-question-might-be-a-factorial-question?p=57813#post57813 Is ...
[no replies]
by jpotts
Starting GUI
 
Hi, Ive been using C++ for a while now, but i never started using GUI with it. Ive looked around, and from what i can tell, making GUI programs is different d...
[7 replies] Last: I don't know about Qt Creator itself. When I installed Qt it integrat... (by andywestken)
by clros
C++0x interruptible thread
 
Hi, it is possible interrupt a C++0x thread?
[9 replies] Last: Alternatively, do you have a blocking recv() with a timeout? (by helios)
by fsshl
no match for call to '(Sequence::const_iterator) ()'
 
Dear c/g++ programers: when I tried to install/build pathan 2.0beta on my g++4.5.2/linux system at make stage, it reponse error ------------ Sequence...
[2 replies] Last: That's half the problem. The other half is that the declaration is am... (by jsmith)
by kkg
Output error: WHat's wrong with my code???
 
My program compiles no prob, but my output makes no sense. Is it just a formattting thing or are my parameters messed up. Please help! I'm really unfamiliar wit...
[7 replies] Last: for debugging purposes it's better to write each expressin on one lin... (by andywestken)
Are the reference pages downloadable?
 
Hi -- I'm shortly to be on holiday for a couple of weeks, but with no internet connection. One thing I really want to do with my time is work on some personal ...
[2 replies] Last: http://www.cplusplus.com/forum/lounge/42421/ (maybe --mirror would be ... (by ne555)
Understanding hash tables
 
Here's what I understand from the definition of a hash table. A hash table is essentially an array that contains items (objects). These objects could have multi...
[1 reply] : Hash maps are usefull when you want to index data by a key. For exampl... (by bartoli)
C++ 2008 Express - Problem Linking
 
Hey all. Sorry to add another one of these posts to the forum. I've done a fair bit of searching and can't find the answer to my problem. I'm using VC++ 2008 Ex...
[6 replies] Last: From what I've read today, I was under the impression that .lib files... (by helios)
Evaluating binomial coefficients
 
This function should evaluate the binomial cofficient C(4,2) = 6. Instead, it is giving me a runtime error. Recursion is hard to understand. #include <iostr...
[5 replies] Last: No. Save for a few exceptions (the rule is rather complicated and not ... (by helios)
by Disch
Adding/Replacing elements in a map
 
Hey everyone. I have a std::map of sorts. I want to add an element to this map and replace any existing element that uses its key (if one exists). The thin...
[2 replies] Last: Pshaw. So obvious if you read. Thanks hamsterman. (by Disch)
Download Updates for Program
 
Hi, I'd like to have my program update itself when the user sends the appropriate command. I'm not really sure where to start, but I have a domain with a defini...
[6 replies] Last: Thanks! (by RedTheGreen)
by zoe
Menu Problems
 
So this is my first time, and I need someone to please solve the problem for me. This is my program. When I ask it to enter on the home menu, it takes me back t...
[1 reply] : dude! is this what you want to your output? #include < iostream > u... (by gandalfgreyhame)
function as a function parameter
 
hi, I have a function xref that takes another function as one of its parameters. however, I get the following error on compilation: error: too few argume...
[13 replies] Last: so, I wanted to revise the code so it read from a file instead of cin,... (by itcplpl)
new to programming
 
hey guys.....im new to c++ and programming in general....about the only things i know is that <html> is a starting tag and if you put document.write before some...
[2 replies] Last: And don't stop there, the rest of the tutorials will undoubtedly prove... (by shacktar)
by lezil
help read map
 
hey guys, im trying to read from a file into a map then use a for loop to figure out if there is a number 1 in the file and for every number one its supose to p...
[no replies]
August 2011 Pages: 1... 1617181920... 29
  Archived months: [jul2011] [sep2011]

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