General C++ Programming - March 2011 (Page 15)

by adeo
Map memory corruption in template style function call
 
I have a strange memory corruption to a std::map when using the std::map.find function and was hoping to get some advice. I am using 64-bit windows XP and compi...
[1 reply] : It's always best to post some code that reproduces the problem. A wri... (by kbw)
isn't the default parameter passing by value?
 
I have a class with a member function declared like this: int cycle(int sampleInput, int coefficient, int filterSumInput, int &sampl...
[11 replies] Last: Taking a parameter by const int is the same as by int since in both ca... (by jsmith)
Problem with Reference counter
 
Heya guys! I'm currently implementing a template class that will handle reference counting for me and it works great except for this 1 problem. When i return...
[2 replies] Last: Yeah I just figured it out myself :D The compiler was of course doing... (by Nsanden)
by Kinny
Inheritence,polymorphism,dynamic memory allocation
 
Hey guys...we just started on inheritence,polymorphism and dynamic memory allocation and i'm really confused don't know what's really going on there. will reall...
[2 replies] Last: Ok ... I will help you understand the concept. But I cannot spoon feed... (by krishnendu)
std::map vs. C Arrays: Performance
 
For some libraries in the game engine I'm just starting to write, I am using std::map<std::string, some_other_type > for collections of types which must late...
[6 replies] Last: Thanks for all the advice everyone. Yes I'm using strings for the same... (by anonymous23323124)
How to convert unicode file to ansi file
 
xml file can store used ansi, unicode, UTF-8 and so on. tinyXML lib can not process unicode file , so I want to convert unicode file to ansi file, any bod...
[no replies]
difference between cstring and string
 
hello! i was just wondering what the difference is between cstring and string. i surfed the web and book for answers, but none really make sense.. also when wou...
[2 replies] Last: Use string. cstring is so 1970's. string is a modern way to represen... (by PanGalactic)
by amo
Rereading a large input file
 
Does anyone know how to reread a large input file? For an assignment I am currently doing I have to read in 1000 numbers store them in array, then reread the fi...
[2 replies] Last: thanks for the reply. I'll see if I making a different error that is c... (by amo)
Hint to complete this program
 
#include<iostream> #include<fstream> #include<iomanip> using namespace std; //Function prototype double calcWage(double , double ,); void printWag...
[3 replies] Last: I don't want this to sound mean but there are so many syntax and logic... (by naraku9333)
class problem!
 
hello i am trying to solve a problem in which a student inputs his grade for 2 quizzes each out of 10 pts and worth 25% of the over all grade, one midterm worth...
[6 replies] Last: and is there a certain reason other than neatness why? ico There is... (by hanst99)
What is the structure for the delete function in linkedlist?
 
its our project can you help me
[1 reply] : Depends on how you implemented it. But in general, you delete the firs... (by hanst99)
print a gray block on the screen
 
I am working on a project where I have to print grid lines on the screen. I have sample code that does this. When I insert the code and #inlcudes into my projec...
[6 replies] Last: Since you figured out what the problem was, you should mark your threa... (by Duthomhas)
by adeo
Map memory corruption in template style function call
 
I have a strange memory corruption to a std::map when using the std::map.find function and was hoping to get some advice. I am using 64-bit windows XP and compi...
[1 reply] : map::find() doesn't return NULL (if that's what you mean by "results a... (by filipe)
Arbitrary or Infinite-Precision Library
 
I'm writing a script that calculates pi, and I need a good infinite-precision floating-point number type. I tried apfloat, but I wasn't sure exactly what to do...
[4 replies] Last: @Disch Thanks; I'll keep that in mind, but apfloat seems to "just work... (by TechnoCat)
by aatwo
Problems with classes
 
Hi guys. I have a program using QT and I have just solved some painfully annoying problem but I don't understand why the solution solved it, so I am coming to y...
[5 replies] Last: Than I managed to hide my confusion successfully. :) Glad to be of hel... (by simeonz)
by aatwo
How to Statically Link a Library
 
Hey guys :D I have a quick question! I have a program that uses the GTK+ library however I would like to statically link it to see if I can get it to run on ...
[3 replies] Last: I tried to respond earlier, but it didn't work... GTK is licensed u... (by Duthomhas)
Squaring
 
hey, im sure i've had this right before, but anyway. i have a tiny pythag function that has a,b,h all as parameters and then inside the function i multiply eac...
[4 replies] Last: thanks im sorry for that trouble . (by jammas615)
any help please
 
Hi, switch ( <variable> ) { case this-value: Code to execute if <variable> == this-value break; case that-value: Code to execute if <variable> == ...
[4 replies] Last: http://cplusplus.com/doc/tutorial/control/ (by moorecm)
by Dehaku
Attemping to convert Int to Const Char
 
I've tried a few different methods that i've found on the internet, but none have worked so far. I'm attempting to save multiple files being lead by a string f...
[2 replies] Last: It took some time, But I have it working now, Thank you for the refere... (by Dehaku)
address book problem
 
hello! i am trying to read into a file that has random names and addresses in it and i want to print out to the screen the name of anyone in that list who ha...
[2 replies] Last: i have no idea whether it's constant formatting or not but what you su... (by yoyo2369)
March 2011 Pages: 1... 1314151617... 31
  Archived months: [feb2011] [apr2011]

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