Beginners - April 2013 (Page 11)

How much is too much Polymorphism?
 
How many classes should be off of a class before it's considered bad? For example: class Object; class Consumable : Object; Consumable minorHealthPotio...
[3 replies] Last: As a general rule, compilation time grows linearly with the number of ... (by helios)
Function that returns input?
 
Hey guys, really quick question :) I am trying to make a basic calculator and am trying to produce a function which displays the main menu, takes user input and...
[19 replies] Last: that works except if someone does both an int and a char (1a) it will ... (by giblit)
by Amulon
Creating a graph
 
So I have been trying to find a good place to learn how to implement a graph, but I have been unable to find one. I have to create a program that reads in t...
[6 replies] Last: So 'sky.push_back (f)' puts all the information read into the vector?... (by SoftDisk)
by zmlink
Not sure how to write the last of this source code.
 
this is what i have thus far and to no avail i have yet to figure out how to write the last bit of this algorithm included after my source code any help is goo...
[10 replies] Last: By the way you are trying create a function inside your main function ... (by giblit)
by giblit
Program crashes if I do not put endl before returning string value
 
Can someone please explain to me or help me understand why my function is not working correctly please basically it works 90% perfect if I add a std::cout << s...
[15 replies] Last: Okay got my decimal to fraction working pretty nice =] (seems to work ... (by giblit)
Why will this not create an outfile.
 
It's not showing any errors but it will not put the id, testave etc into the outfile also. The file is created but only has the header not the rest of the infor...
[7 replies] Last: Function getInput() will always return 0 as the value of totalStuden... (by Chervil)
Help with Classes and .h files
 
I have to make a .h file (with classes), link it with a .cpp file and g++ -c to create a .o file. Once I do that I have to link it with another .cpp file to get...
[7 replies] Last: Thanks that helps. (by Gawaine)
by Ispil
Constructive Criticism of Code
 
So, I finished polishing up some code I wrote... could I get some constructive criticism of it? Just want to be sure what I did in it is good practice. #i...
[5 replies] Last: ¿why is a `calculate()' function printing ? ¿why are error messages... (by ne555)
Checking for images crossing paths with each other?
 
Write your question here. void playBoss(){ int olddirection = 0, newdirection = 0; //initial values int bossDirection; int activate = 0; bossRoo...
[1 reply] : an attempt to detect when character and boss cross paths. Either x co... (by keskiverto)
S-Expression Tree of strings and symbols
 
Hello friendly people on this site who are smarter than me in C++. I am teaching myself about s-expression trees in C++ and trying to make one. It's a very ba...
[no replies]
Help with vectors
 
I am having an issue with vectors and I can't seem to find the answer in the documentation on vectors. I made a class with functions inside and then added that...
[4 replies] Last: That's what i was thinking too. I initially had "i" in there and it ca... (by JayRyGeo)
bool function
 
Hello. I am now learning classes and vectors. To learn it better I tried to make small program to understand it better. After some time I managed to make a boo...
[3 replies] Last: You're welcome :) (by MikeyBoy)
How to link files?
 
HI! My question is a little off topic and that's I don't know what should I do to write complicated programs. I used to write programs that had only main.cpp ...
[2 replies] Last: http://www.cplusplus.com/forum/articles/10627/ (4) By the way u... (by ne555)
Which container to use to remove duplicates?
 
I have many pairs of co-ordinate positions (starting points and destinations). If any of the pairs have the same destination, I need to delete all the pairs wi...
[6 replies] Last: You have been extremely helpful. Thank you. (by blueeyedlion)
Void and clrscr
 
I am confused with this code, I got this tutorial from internet. I dont understand how to use void, and the compiler say that clrscr is not declared on varia...
[5 replies] Last: [quote=lmsmi1]why not just print a lot of '\n's to the console and res... (by OxBADC0DE)
by shrina
value returning in function
 
I have written this function to find the over all class average, so how can i pass the avg value to another function?? double OverallClassavg (student d...
[4 replies] Last: I tried it's not working !!!! Any other ways?? (by shrina)
by Omeyer
Another Time question
 
Our last chapter is covering Classes. The assignment is to design, implement, and test a class that represents an amount of time in only minutes and seconds (n...
[2 replies] Last: Thanks! That seemed to take care of the Write function, but Im still ... (by Omeyer)
My own itoa (Help)
 
Why is this code giving me a seg falut? How can I fix it? Please help. #include <stdio.h> #include <math.h> #include <stdlib.h> void good_itoa(in...
[10 replies] Last: Yes I see exactly what you are saying. I actually thing that is a real... (by bruntmjust)
How can I make my SDL application into an applet?
 
I have made a simple program, Its basicaly just a screen with an animation on it, how to I display that on my webpage? I researched and searched but didnt find ...
[2 replies] Last: Is there anyway of displaying a C++ application on a webpage?? (by devonrevenge)
by whebzy
Looping Code for Random Number Generator
 
I am making a random number generator an I want to loop the code so that every time the user hits enter, the formula is applied to the current value for "random...
[6 replies] Last: If I understand it correctly it's the code I show in the 'Fix' part. (by Minimacfox)
April 2013 Pages: 1... 910111213... 83
  Archived months: [mar2013] [may2013]

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