General C++ Programming - November 2013 (Page 35)

Program that calculates discounts.
 
So my midterm exam for programming is done. My program didn't run. Tried rewriting it once I got home. I am still getting an error that the program could not be...
[1 reply] : Please please please use code tags, which you can get from the <> butt... (by Albatross)
Void functions question
 
I'm working on a program assignment and the instructor wants us to use void functions. I'm not understanding the reason these are used anywhere. Wouldn't it jus...
[7 replies] Last: The start of the for loop bit sounds about right. If you kept the brea... (by Albatross)
arrays and functions
 
#include <iomanip> #include <iostream> using namespace std; int buildARRAYS; int levelsARRAY ; int scoresARRAY ; int starsARRAY ; const int num=400; i...
[1 reply] : You're code is almost the same as this guys: http://www.cplusplus.com/... (by odannyc)
Help with Array Location
 
I need assistance with this.. All my code is good, except the functions: findMacLoc and findMinLoc . They don't give me the correct array location of the max/...
[2 replies] Last: Wow well that was simple -_- I'm not sure why they're there. Maybe be... (by odannyc)
by game
Sorting 2D points clockwise
 
Dear all, I badly seek your help, as i expect several hours to solve! I have 2D points written in {x1, y1, x2, y2, x3, y3, .....} #include <iostream...
[6 replies] Last: FWIW... if you just need to compare relative distance... you can remov... (by Disch)
Library
 
I didn't put this in beginner because this troubles everyone. Which library is if chdir() in?
[5 replies] Last: Noo! No assembly god no! Its torture! (by RealGiganitris)
very hard question using stacks!!
 
hey everyone!! im facing a really hard question in my data structure course. here is the question: Given a number of digits your program is required to pri...
[1 reply] : After your if (sign ==',') remove the line that says stack.pop(); That... (by Troy Dietz)
What happens in this program ?
 
Please refer the following code : #include<iostream> using namespace std; class abc { private:int a; public: abc() { a=7; } public:void disp...
[4 replies] Last: thnx ! (by binarylife)
string to int fail :(
 
Hi! I try to read some numbers from a file (there're 4 numbers in each lines), which works nicely until i convert string to int. what is wrong with this? #i...
[5 replies] Last: try somthing more simple. Heres what I use, it's templated so you don... (by IWishIKnew)
Geometric Shapes
 
This program will out put different geometric figures enlisted there. But i am having hard time at last part and it also tells me I got it wrong in menu(). Some...
[3 replies] Last: When I compile the programme, it says there are many uncleared charact... (by evan1991)
constructer
 
Why don't we have virtual constructors in c++?
[4 replies] Last: Stroustrup answered this question in his FAQ: http://www.stroustrup.co... (by Cubbi)
by eonly
How can I convert this for loop into a while loop?
 
for(int j=0;j<numberOfLevels;j++) { if(levelsArray <levelsArray ) { int temp1=levelsArray ; int temp2=scoresArray ; int temp3=starsArray...
[2 replies] Last: for(control variable; Boolean expression; counter) All you need to d... (by Scott7975)
Creating a billing system
 
Hello, this is all new to me and i've been trying to do this for countless hours and would really appreciate any help. I have to create a program that will allo...
[no replies]
Problems with dynamic allocation
 
Hi everybody ... i'm now working on a class to handle matrices and matrix operations. I dynamically allocate a two dimensional array with its size as an input. ...
[5 replies] Last: You can re-use variables as much as you want, though careful not to ge... (by LB)
Kruskal's Minimum Spanning Tree
 
Hi, can somebody help me implement Kruskal's Minimum Spanning Tree algorithm? I have Prim's algorithm completed already. I'm not sure how the MST works. Any adv...
[2 replies] Last: Minimum spanning trees are just connected subgraphs that are trees. K... (by thebeto1of)
by j2013
creating pattern
 
Hi, how to create a diagonal pattern by the given function void diagonal(int size, char op) The function takes in 2 arguments, size and op and displays a ...
[4 replies] Last: You obviously messed something up. It works perfectly fine for me. (by Polaz)
Matrix Checking Rows
 
I have to create a program that allows a user to fill in a (partial) Latin Square of order 4. You can use 0's to represent empty cells. The user will give the n...
[no replies]
"Expression must have class type" error in program
 
Hi all, I have an assignment to write a program that numerically calculates the integral of a function. The main points of the assignment are to use function ov...
[3 replies] Last: I'm no maths expert, so I'm not the person to ask. But one thing spri... (by MikeyBoy)
Need help with my linklist
 
How do I change this code so that the user does not have to enter the name and telephone number? I want to have 3 names and numbers ready in my code. s...
[1 reply] : So you want to have 3 names and numbers without having the user enter ... (by Uk Marine)
Printing with "ostream &operator<<( ostream &out, const Vehicle &v )"
 
I am trying to get the data stored in my vehicle object to print like this: Vehicle Number of doors: 2 Number of cylinders: 6 Transmission type: 3 Colour...
[5 replies] Last: Thank you so much coder777. You saved the day again. :) I spent hours ... (by bennyjammin)
November 2013 Pages: 1... 3334353637... 46
  Archived months: [oct2013] [dec2013]

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