General C++ Programming - December 2009 (Page 12)

memory leak in assignment operator (using vectors)
 
Hey all - my set class uses two vectors, data<int> and child<set*>. I keep getting a heap leak inside the assignment operator. I've been back and forth over thi...
[4 replies] Last: aha! worked like a charm. thanks muchly. (by piranhaofeden)
Urgent....Need assistance for final exam please?
 
THANKS ITS SOLVED NOW
[1 reply] : 1. Prompt for state abreviation 2. cin>>state;//make sure state will ... (by buffbill)
by danz
Resolution of delay function
 
Hi folks, In the function below, what is the resolution of the delay? Here's an example of the data when I run. So, elapsed time = (2451315171111 - 2451297...
[3 replies] Last: Actually, I just noticed. You're losing a lot of precision when dividi... (by helios)
Bus error
 
I have this class matrix that consist of a vector of vector of int: vector<vector<int> > rows; anyway I overloaded the increment operator on it matr...
[2 replies] Last: Yeah, I did that on purpose (I don't know if it is right). Take the pi... (by dunsondog109)
Another Template Problem
 
Hello you guys...trying out new programs using the template class T...I'm really new at this sort of things and would be thankful if anyone could help me...Here...
[6 replies] Last: Thanks for all you guys help....... (by CATCH3624)
How can i fix this program
 
//Program that displays States and shipping prices # include <iostream> using namespace std; int main () { //Declare Variable int state1= AL; int stat...
[7 replies] Last: But what code i can use? (by Lakers10)
confusion on ifstream and ofstream
 
I was reading the tutorial on Input/Output with files and I came across two sentences that seemed (to me) to contradict each other. For ifstream and ofstr...
[3 replies] Last: I was just looking at this in the Boost Iostream library and there, th... (by PanGalactic)
friend function for overloading increment operator
 
I have a class matrix and I want to overload the increment operator using a friend function; however, I believe my syntax is wrong. /* * matrix.h * *...
[5 replies] Last: Thankyou guys! (by dunsondog109)
getting input from a file
 
As the person who posted below pointed out, this should have been in the beginner's section... Please remove this for me
[1 reply] : This really seems like a beginner question. Yet you didn't post this ... (by PanGalactic)
auto-import DLL's
 
I'm getting a strange warning that I don't understand and was hoping someone could explain it to me. Here is an example that illustrates this behavior. Foo.h...
[no replies]
error: expected initializer before ‘addRow’
 
I got this error message when I tried to compile my matrix.cpp file: matrix.cpp:28: error: expected initializer before ‘addRow’ Here is matrix.c...
[1 reply] : void matrix::matrix addRow (int row, vector<int> columns) I sup... (by melkiy)
by jf007
Hangman - runs, but has a logic issue?
 
Hi - I'm just getting started in programming. This game compiles & runs with 2 warnings; ---------------------------------------------------------------------...
[2 replies] Last: Thanks Galik! I really appreciate the help. - jf007 (by jf007)
by mrkhtn
Class errors
 
Would someone be so kind to show me how to eradicate these errors in the below class: /*********************************************************************...
[8 replies] Last: template <typename T> void Set<T>::insert(T &t)const { ... (by mrkhtn)
errors using vectors
 
Hi everybody!, I'm creating a class called matrix which I'm going to use to make matrices. Anyway, I'm new to using vectors so I've probably declared them wron...
[2 replies] Last: Thank you. I just noticed that as well! However, I still get these err... (by dunsondog109)
interaction between the ComboBox, Button and TDBCtrlGrid
 
I can't understand of interactionfunction of those ComboBox, Button and TDBCtrlGrid Hello everyone, I attached here my designed small program. The problem i...
[1 reply] : Which library are you using? What are you trying to achieve? (by Bazzy)
ways to reduce compiling time
 
is there any short article introducing all "tricks" to struct the c++ project to make it compile faster? I have a big c++ project, which takes maybe 10 times l...
[6 replies] Last: really appreciate you guys' help. will read through Disch's link and m... (by chrisben)
by aaliya
what is the solution for the below sloution????
 
Hi, sry. 12 members are playing musical chair.in that i want to delete 11th chair? what is the solution for this???
[1 reply] : http://www.cplusplus.com/forum/articles/1295/ (by jsmith)
Valid date
 
Stuck, can't figure out where i made a mistake #include <iostream> #include <string> // Function prototypes: bool IsValidYear( int ); bool IsValidM...
[1 reply] : I think the compile error are quite obvious to fix: test.cpp: In... (by lloydchristmas759)
Heap corruption detected
 
I have "HEAP CORRUPTION DETECTED after normal block at CRT DETECTED that the application wrote to memory after end of heap buffer" error Message ...
[3 replies] Last: Thank for all your help. I found the solution. Now it works with... (by icapri77)
deconstructor issue
 
Im writing a program that is printing out binary search trees and binary trees. Im getting a weird error involving the deconstructor of one of my ,h files. ...
[10 replies] Last: hay wait a minute... didn't I say that in my first reply? haw (by Disch)
December 2009 Pages: 1... 1011121314... 16
  Archived months: [nov2009] [jan2010]

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