General C++ Programming (Page 5)

New! Join the C++ community on Google+
Binary Trees problem
 
I only need help with finding the maximum leaf level and the minimum leaf level. I got my code to pr...
[no replies]
by ajitm
How to write lost focus event for combo box with drop down style
 
As combo box is having three styles, Simple, drop down, and drop list. I want to write event lost fo...
[no replies]
Building Libgd on Windows XP / MinGW
 
Has anyone built Libgd on Windows XP using MinGW. It almost seems that it can't be done. I'm get...
[no replies]
Hashing
 
21 76 118 If I have the above numbers and some function like below: hashvalue := (i*i) mo...
[1 reply] : http://en.wikipedia.org/wiki/Linear_probing 21^2 = 441. Modulo 97: 53... (by helios)
by iky
strings in loops?
 
hi. im trying to make a loop that will end when the user types in 8 numbers for the telephone number...
[5 replies] Last: Ah! Okay... In that case I would still suggest reading in the numbers ... (by Binary Thoughts)
by Phiru
vector push_back? append?
 
I want to know the differences between push_back and append func. I usually use push_back functio...
[1 reply] : there is no vector::append. Perhaps you saw code that used strings ? (by Cubbi)
passing a struct to a constructor
 
struct charType { int health; int strength; int constitution; int stamina; int per; short colo...
[5 replies] Last: You can try passing by reference: Character::Character(int, int, int,... (by pogrady)
Program that checks if a user inputted double variable is valid breaks when it's not valid. How do I fix it?
 
I'm working on a project for my C++ course and part of it is to make sure there is no way the user c...
[5 replies] Last: The canonical way to do that is: #include <limits> // ... std... (by cire)
Diamond code
 
/*c program for number pyramid*/ #include<stdio.h> #include<conio.h> int main() { int num,r,c,...
[no replies]
Miles to KM. Km to Miles etc..
 
#include <stdio.h> double m2km(double); //Convert Miles to KM double km2m(double); //Convert KM ...
[no replies]
How to have a class return an instance of it's-self.
 
Hi guys, I was wondering if (in C++) you can instantiate a class (class foo) then have said cl...
[12 replies] Last: @OP: ¿do you understand why global are evil? ¿do you realize that si... (by ne555)
helpe me plz
 
tp1.cpp template <class T> T permut(T &a,T &b) { T c=a;a=b;b=c; } g++ -c tp1.cpp -o tp1.obj t...
[1 reply] : expln prblm plz... nd uz cd tgz! slct ur cdz n prs teh <> btnzzz.* ... (by cnoeval)
by saugat
Guess Game Problem
 
Its a guess game with 4 rounds.. i just need to find the average number of guesses. I DO NOT need t...
[4 replies] Last: Yep, I was thinking lines 71-72 but wrote 83-84. My bad. (by toum)
Sending application with static libraries.
 
i am using MSVS 2010 Express, Visual C++. and i have the allegro libraries linked statically, i was ...
[4 replies] Last: oh wow, that was very informative, thanks a bunch man! (by Naughtyusername)
Need help
 
Why does this not display 2% when it outputs all the answers. It does the calculation of 2% fine but...
[5 replies] Last: Use code tags. Can't see any changes from the first post... #include... (by Maniax)
GCD AND LCM
 
How to find GCD AND LCM of two numbers in c++? help please..!
[no replies]
How to display tax from this code.
 
cout << " Tax deducted:" << tax << endl; cout << "Total Balance : " << totalBalance << endl...
[no replies]
I need help with the program
 
Here is the question 1. Write a function convertArray ( ) that takes an array of integers a, and ...
[1 reply] : You use return before the loop terminates therefore you get a false va... (by Maniax)
How to check if std::cin (or stdin) has data in it's buffer.
 
Hi guys, I need to be able to check if an input buffer (in this case std::cin or stdin) has dat...
[3 replies] Last: I was able to get what I wanted by just having my Qt framework call a ... (by snow 56767)
Final assignment need immediate assistance
 
Using the code that i will post below i need to add in certain functions that I will list in a momen...
[1 reply] : #include <iostream> #include <string> #include "main.h" #include <std... (by RogerWang)
Pages: 1... 34567... 76
  Archived months: [oct2012]

Cannot post in this page. To post a new message, go to the first page.