General C++ Programming - April 2011 (Page 17)

by dimang
image from camera
 
Hi, sorry for duplicating my topic which I created in the Windows Programming section, but I see that a lot more people are visiting this section, so hopefully ...
[no replies]
Strange Memory Leak
 
There is a memory leak after clearing the vector (Base) that i don't understand. The Task Manager shows an increase of 4 K - once so it doesn't increase furthe...
[5 replies] Last: so the capacity remains the at maximum of what was reserved once unti... (by Athar)
atoi for letters? HELP
 
I am new here, but the site and the forum have both been realy useful for me. Now, about my problem: I have a char variable (c, for example) that is a 2 digit...
[5 replies] Last: I solved, using strpbrk. Thank you anyway. (by hermanny)
File I/O inside a C++ dll?
 
I'm trying to build a C++ dll that is used by a Visual Basic GUI; it's a micromouse simulator. I've had success in getting the two to talk to one another, but ...
[no replies]
Loop not working
 
The idea behind this assignment was to declare 5 structs in an array that hold information read from a file. I made the struct/array, and it reads from t...
[3 replies] Last: while (i<5) {ifstream infile; char testinfo ; infile.open("testinfo.... (by lnk2019)
by Gldnbr
Problem with switch
 
enum numbers { LESS, HIGH, SAME }; switch (numbers) { case '*': if (newOne == '-' || newOne == '+') return HIGH; if (newOne == '/')...
[4 replies] Last: Oh okay, now I see. Thanks! (by Gldnbr)
by Ehorn
Problems with Linked List
 
Hello all; Having a little trouble setting my head pointer to NULL so that I can check to see if an addition to the linked list is the first one. Here is wh...
[3 replies] Last: Fryebyrd and gd18; Thank you very much for the help. Dictionary::Dic... (by Ehorn)
HOw to Reduce Fractions and How to ovrload the >> opertor in classes???
 
SO, This is my code: This is the H.File #ifndef H_fractionType #define H_fractionType # include <iostream> using namespace std; class fractionTy...
[3 replies] Last: #include <iostream> struct Fraction{ int a, b; }; std::istre... (by hamsterman)
by yunru
OpenGl problem
 
Hey guys im kind of a beginner on openGL, im trying to make this ball bounce using this code but it runs in super speed, any idea what im doing wrong?? im usin...
[4 replies] Last: Ok i did it, thanks for all the help hamsterman, here is the code: ... (by yunru)
new int[] throws 'Access Violation' exception
 
I've been working on custom Vector class. Everything works perfectly fine on Microsoft compiler, however when I try it on Borland I'm getting a really strange e...
[1 reply] : You're having an out-of-bounds access in insert. In the first iteratio... (by Athar)
Would you suggest doing this?
 
/*foo.h*/ int foo(int,int); //... /*Some other file*/ namespace foo_h{ #include "foo.h" } //.... struct foo{ //... int bar(){return foo_h::foo(10,...
[1 reply] : wouldn't be simpler to put the struct foo in a namespace? C could be ... (by ne555)
by Ehorn
Help with "Undefined Reference" Error
 
Hello all; Working on a project program for my programming class and I am having a hell of a time with it. I am pretty sure the solution to this problem is ...
[4 replies] Last: Thanks Hamsterman for the help. Adding the constructor to the implemen... (by Ehorn)
need help with my exercise
 
I am slowly getting lost at this point in my class. The local Driver’s License Office has asked you to write a program that grades the written portion ...
[3 replies] Last: i got it the issue i was having was how do i check to see if the answe... (by dirtdevil810)
having trouble reading file with a function
 
I have this assignment that works, however, it only outputs the last name on my list. my input file has about 6 names on it. They are formatted: lastname, first...
[5 replies] Last: Well, if the functions processed one line per call, then maybe you cou... (by PanGalactic)
by Rob146
Compatability issues?
 
Hello, I am extremely new to Linux, I am running Ubuntu on my laptop, my problem is that I have a yearning to learn C++ programming. I have read some sources an...
[14 replies] Last: This forum has it's own method for displaying code, which is to put [c... (by Zhuge)
by Zviri
Calling parent virtual destructor from child
 
Hi, is it possible to call parent virtual destructor from the child destructor? I'm used to call parent virtual functions trough Parrent::func(), but this n...
[3 replies] Last: You're welcome. It's easy to verify. If you put a cout statement in ea... (by closed account D80DSL3A)
resource files
 
i am probably way out of my league on this but can i just get some basics on programming resource files plese. any help is greatly apreciated. ps. if you...
[no replies]
Problem with a method from class
 
Hello programmers. Im having a bit of trouble with one method in my class called print_balance. Can someone help me out and tell me why its not working? Here is...
[no replies]
by Sam 07
Binary Tree pointers printing out memory address?
 
I am having trouble with a program that I am writing. It is supposed to play the 20 questions game, and save the data in a binary tree. It also learns if it is ...
[no replies]
Opinion on good draw function
 
I'm currently using sfml 1.6, trying to create a simple game engine. Ive been toying with a few ideas on how to organize a collection of sprites and then draw t...
[2 replies] Last: No I had not. Set seems like it might do the trick. It sounds a little... (by Deftwun)
April 2011 Pages: 1... 1516171819... 37
  Archived months: [mar2011] [may2011]

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