General C++ Programming - February 2014 (Page 5)

Eliminating jumping repetitions of different orders
 
I wrote a program for class. It did its job, but I want to make it better. The program finds all of the Pythagorean triples between 1 and 100. As you can see,...
[5 replies] Last: That works. I confused myself and thought it didn't work when changing... (by DyslexicChciken)
Creating Bank accounts using classes
 
I am creating a bank account using classes. I have created the classes and now implementing them in my main program. I haven't written anything in the withdraw,...
[5 replies] Last: @Yanson Thank you so much for your help! I fixed that and it worked bu... (by fbhkhan)
Bubble sorting with user defined amount of elements
 
Hi guys, my first post here. Im writing some code to bubble sort a list of randoms numbers, 10 at the moment. I want to be able to user input the amount of ...
[1 reply] : @easty1802 Here is how to create an array of unknown size, at program... (by whitenite1)
Using a PrintMenu with a switch statement.
 
So I have to create a program to use a Printmenu, allowing the user to choose option 1 2 3. The problem I am stuck on is figuring out how to allow the user ente...
[no replies]
Program involving a database?
 
Hello all, this is my first post, so I'll start off by saying that I began programming about a month and a half ago, and being a "math person" it was mostly int...
[no replies]
by Dkob1
Need Help calculating
 
So I did it this far, I'm not really sure what to do after this. How do I do the operation of two integers that gives you the results? I'm supposed to write a ...
[7 replies] Last: You appear to be under the impression that the variable used for the s... (by Mike5424)
I know how enumerations work, but this looks odd to me
 
I understand the concept of enum and typdef. But what I don't understand is how the second code typedef relates to the enumeration under it. I would have that t...
[3 replies] Last: See that's what I was thinking, that they can't relate. But, in the do... (by RickBlacker)
by Dkob1
What errors are there?
 
What am I doing wrong, I keep getting 3 errors? #include <iostream> using namespace std; int main() { int choice; // to hold an integer represen...
[3 replies] Last: Something wrong with your IDE settings, code is working fine: http://i... (by MiiNiPaa)
Code for Huffman tree not working properly
 
I'm trying to write a program building a Huffman tree, but my code isn't working when building the actual tree before doing the binary encoding. The tree is sup...
[2 replies] Last: #include <iostream> #include <string> #include <fstream> #include <s... (by cire)
Sum of digits entered.
 
A problem that lets the user enter any positive integer, but you do not have to check for this, and then calculates the sum of the digits and displays this to u...
[5 replies] Last: Nope, it won't work for numbers > 99. Your algorithm should be someth... (by MiiNiPaa)
Yes/No Statement
 
...
[9 replies] Last: I realise the op said 'C', but it wasn't clear - I thought this was a ... (by exitcode)
Unresolved External Symbol
 
Hey, my code is rather short, but when I compile it, I get 1 error about an unresolved external symbol, it probably has something to do with the file processing...
[3 replies] Last: Well, it's funny because even, #include <SDL.h> #include <fstream> #... (by Aaron Vienneau)
by IBCFQ
Looking for a learner
 
Hello, Not sure if I'm posting in the right section, however I am interested in learning C++ with another person to speed up the capabilities and learning. I...
[no replies]
Stuck on getting highest number output using array
 
Here is my code and everything works except i can not get the highest array number to be output. it always says 10. Any advice or where I should start looking t...
[4 replies] Last: int* max = data; for(int* ptr = data, ptr < data + 10; ++ptr) if ... (by MiiNiPaa)
Blackjack HELP
 
Hey there i've a problem. I want to have 2 cards at the beginning but more cards come out when either J Q K appears. Please help me. Thanks #include <iostr...
[2 replies] Last: @Mats Thanks alot! Really Appreciate your help, it's my first time co... (by eugenelet)
Flicker Problem
 
hi, i create the dialog based application and draw the line inside the picture box. if line is drawn then display the msgbox, if not close the msg box and resiz...
[3 replies] Last: No, it's not flicker. Flicker means that you see all the elements, but... (by coder777)
C++ GPA programming
 
write a program and an algorithm that determines a persons GPA, this will be based on taking only two classes. The GPA is found by using following formula: GPA...
[5 replies] Last: ok thank you all! (by Noob Programmer)
Point and Line Class
 
#ifndef POINT_H #define POINT_H #include <iostream> using namespace std; class Point { public: //Default constructor Point(); Point(double new_x,...
[2 replies] Last: Thank you for the reply that did the trick. I basically wasted 2hr thi... (by PaddlePow)
Array Help PLZ
 
SO this is the question Consider the following function main: int main () { Int inStock ; Int alpha ; Int beta ; Int gamma = {11...
[2 replies] Last: its complaining about these (int inStock , you can't pass a 2d arr... (by Jaybob66)
Put my code in a function
 
Hey guys this is my code i want to put the part where i have it do multiplication and addition into functions. and then call them so that it can run the additio...
[2 replies] Last: Further more on line 13: while (again == 'Y' || 'y') { Does no... (by coder777)
February 2014 Pages: 1... 34567... 33
  Archived months: [jan2014] [mar2014]

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