General C++ Programming - April 2012 (Page 37)

Object in multiple classes
 
Hi everyone! I'm working on an assignment for school (I'm remaking the Intro Stage from Mega Man X). The thing is... I've got a class "Bullet" and a class" ...
[8 replies] Last: Ok! Thanks for all the help! I'll try it out! I'll need to look some t... (by frostraver)
multiple subclass problem please help
 
I don't know why i'm getting this incredibly long error list but maybe i'm over looking something. When I used these 2 headers with the cpp file it worked fine ...
[1 reply] : Is there anything I did wrong in the twoday class (by willatSMU)
how do i program a guessing game?
 
hey guys. i really need ur help. how do i program a guessing game with this following requirements?? Write a 3-digit number-guessing game based on the requirem...
[4 replies] Last: I would use an int array element for each number. I'll cook you up a ... (by SH4773R)
pimpl implementation
 
Hi, I am trying to implement a pimpl implementation, but seem to have a problem. This is the header Record.h #include <iostream> #include <string> #include...
[2 replies] Last: Thanks alot, works now! (by Braniac0)
Problem with objects inside objects
 
Hi, I'm having a problem with objects inside other objects: for example: class pepe { private: int x; string y; double z; public: pepe(void){...
[2 replies] Last: thanks!! (by claudiordgz)
by Mannah
Classes with enums in it !!!
 
#include <iostream> #include "student.h" #include <cstring> using namespace std; student::student() { firstname= new char ; lastname= ne...
[2 replies] Last: #ifndef student_h #define student_h #include <iostream> using name... (by Mannah)
GUI programing?
 
is there any library u recomend me learning for doing multiplatformed GUI programming in c++? since i dont think sdl is gonna cut it when doing gui stuff, am i ...
[4 replies] Last: haha ya. i mean even just creating a simple in game menu using sdl can... (by even821)
Any way to move this function definition out of the struct body?
 
I got a couple of funny errors that I wasn't sure how to deal with in the following situation: template <int S> struct Mytempstruct { struct Iterator; ...
[2 replies] Last: You're right it does compile...I must have either made a mistake or no... (by Gladdok)
<fstream> changing mode of the object?
 
Hey I have a class that I have been working on and while it dose what I want it to do. I`am opening the file in binary mode and because of that I don't get the ...
[2 replies] Last: Not shure i understand ch beeing what value? Fail to see how this will... (by WetCode)
Star Pattern Programming Help Asap!!
 
I am trying to add a simple void function to a program. This what I have void StarPattern2() { int max_stars = 7; int min_stars = 1; while...
[2 replies] Last: Actually I tried it again and it is working thank you very much (by Ernesto Nunez)
by Ash6
array of random alphabets
 
hi,can anyy one help me to generate matrix of size 26 x26 through c++ coding , having Alpahbets placed randomly in each row of matrix means each row should hav ...
[5 replies] Last: With all due respect, it's not good when you solve someone's homework.... (by TheDestroyer)
Return value of an overridden class
 
Hello guys, I have a simple but confusing question here. Is it legal to have a different return value type for overridden methods than the abstact ones defined...
[2 replies] Last: It complained when I created an object of the class. Thank you :-) (by TheDestroyer)
by shaggy
How can i shoot a vector of bullets?
 
HEy i am wondering if anyone can help me shoot my bullets. I have a bullet class and player class, can i have some guidance as to where to declare my object an...
[2 replies] Last: You'll need some third class to handle the game itself. This would co... (by Telion)
by Jp P
Writing Array to outputfile
 
Hi, i'm trying to write a array to a txt file and my program works perfect, but when i open the file it saved to it's a bunch of "0"'s, how do i get them to re...
[2 replies] Last: Yes i do! Thanks a lot (by Jp P)
Protected variable
 
Hi, I have studied protected variable and planning to use sample below program.I was expecting the error because as per my understanding protected variable only...
[4 replies] Last: What is the use of making the variables protected? You would make v... (by IceThatJaw)
Random Objects
 
Can anyone point me in the right direction, like a tutorial site, on how to create a random amount of objects? Thanks
[3 replies] Last: Arrays are complicated and rarely useful. Use vectors, like you're sup... (by Cubbi)
by htown
first byte
 
Hey, I need to get the 1B in hex to a variable by itself. How would I do that? Just the first byte of info. memory = 0x1B111B44;
[1 reply] : Use bitwise operators: http://www.cplusplus.com/doc/tutorial/operators... (by firedraco)
redefinition; different basic types
 
A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in exc...
[2 replies] Last: To use the time functions do I first need to to convert the string to ... (by user056)
Goto statements, any alternatives
 
Hello, is there any possibilities not to use the Goto statements in this program? #include <cstdlib> #include <iostream> /* Program to accept the sala...
[2 replies] Last: Thanks, I got it! (by dalichey)
Class Errors - Undefined reference to class::function
 
Well, I'm making a class for storing bits.. And I'm not sure what the problem is.. For every function used, there's an error as in the title. I have absolutel...
[3 replies] Last: I had a similar problem a few weeks ago when i switched to code blocks (by oonej)
April 2012 Pages: 1... 3536373839... 49
  Archived months: [mar2012] [may2012]

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