Forum: C++ Feb 18th, 2009 |
| Replies: 2 Views: 284 For instance... I have the class Deck, which represents a deck of cards, and I want another class, derived from that, called cards, I want class Deck to have a class array called Cards[52], so I can... |
Forum: C++ Feb 8th, 2009 |
| Replies: 6 Views: 717 There is absolutely no point in using a pointer... |
Forum: C++ Jan 25th, 2009 |
| Replies: 5 Views: 366 Ugh you guys are awesome, thx :P |
Forum: C++ Jan 24th, 2009 |
| Replies: 7 Views: 385 |
Forum: C++ Jan 24th, 2009 |
| Replies: 5 Views: 366 Which is in higher demand in the job market right now??? |
Forum: C++ Jan 21st, 2009 |
| Replies: 14 Views: 612 I have a question, why, when your setting up a constructor, do you declare all the objects values in the cpp file, yet comment the exact stuff in the header, why not just do it all initial constructor |
Forum: IT Professionals' Lounge Jan 17th, 2009 |
| Replies: 3 Views: 541 Just curious to see who has memorized the 70 or so lines to create a window, I for one am almost to the point of having it totally memorized, and I also know what it all means, thats obviously... |
Forum: C++ Jan 11th, 2009 |
| Replies: 7 Views: 423 Yes, I've been teaching myself for awhile. I'm fine with most aspects, its just pointers have always kicked my ass in one way or another, like the compiler will expect me to put something in that... |
Forum: C++ Jan 11th, 2009 |
| Replies: 8 Views: 475 Noone on here, I can nearly say I am 100 percent positive, will give an honest answer of anything besides C, you pie chart is done, very bad poll dude, no offense |
Forum: C++ Jan 11th, 2009 |
| Replies: 3 Views: 920 yeah I actually had it on a seperate pc and didnt ctrl v it onto here, rather quickly interpreted it, my bad, but thx a lot, and one last thing, I tried to add a function called
char... |
Forum: C++ Jan 11th, 2009 |
| Replies: 7 Views: 423 ugh can you just show me what you would do in the int main() too I'm really having severe problems, me and pointers are just not friends |
Forum: C++ Jan 11th, 2009 |
| Replies: 3 Views: 920 So I'm having trouble with classes today, I want to do something like
#include <iostream.h>
using namespace std;
class Dummy{
char Name[256];
void setName(char nam){Name=nam;}
}; |
Forum: C++ Jan 11th, 2009 |
| Replies: 9 Views: 449 WTF, I went into your program and changed the 2 to a three and my computer started beeping about 3 times a second and printing off weird symbols on the console, i nearly messed myself |
Forum: C++ Jan 11th, 2009 |
| Replies: 7 Views: 423 so far ty, however i have 2 questions, I dont know why I need a const in there, and I cant find any really helpful tuts on polymorphism and class deriving, can you lead me to a good one :P |
Forum: C++ Jan 11th, 2009 |
| Replies: 7 Views: 423 I want to create a battle system for an RPG game, one a little more robust then the previous one I made. This one I want to be very dynamic and easy to use. I want to use the Allegro API for it, but... |
Forum: C++ Dec 30th, 2008 |
| Replies: 3 Views: 382 |
Forum: C++ Dec 26th, 2008 |
| Replies: 3 Views: 382 Learn how to fully use the windows header with help from
Windows.h Tutorial (http://www.winprog.org/tutorial/simple_window.html), I'm pretty well along in the Programming world and was wondering if... |
Forum: C++ Dec 26th, 2008 |
| Replies: 15 Views: 1,046 |
Forum: C++ Dec 26th, 2008 |
| Replies: 4 Views: 306 If I use things from another class I tend to just do a heirarchy, branching one off another and protecting the values i want only in the heirarchy, for example
class Mother{
};
class Son:... |
Forum: C++ Dec 21st, 2008 |
| Replies: 4 Views: 349 //Deck Class
#include<iostream>
#include<stdlib.h>
using namespace std;
class Deck{
int Cards[51];
public: |
Forum: C++ Dec 19th, 2008 |
| Replies: 15 Views: 1,046 I must say I always love a program where I can use #include<vector> vectors are like the peanut butter to my chocolate! |
Forum: C++ Dec 19th, 2008 |
| Replies: 6 Views: 577 I figured it out on my own, but BeyondTheEye gave a pretty good description, REP!!! |
Forum: C++ Dec 15th, 2008 |
| Replies: 6 Views: 577 What I want to do is make a grading system. There is a vector for schools and classes and students, all of these which have their own class, derived from a class called system.
class System{
School... |
Forum: C++ Dec 15th, 2008 |
| Replies: 4 Views: 483 After reading up on them in terms of class hierarchy, they seem to just be almost like comments, to remind you that all classes use this sort of function |
Forum: C++ Dec 5th, 2008 |
| Replies: 7 Views: 629 I've been reading up on templates and they just seem like so much hastle for so little reward. I can't find anyway to effectively use it over vectors. I am just having a lot of trouble learning them... |
Forum: C++ Dec 5th, 2008 |
| Replies: 4 Views: 46,873 I suggest Allegro, its an excellent API, my favorite for 2d work
allegro.cc |
Forum: C++ Dec 3rd, 2008 |
| Replies: 4 Views: 299 thx, but I need to be able to put data into those for statements and theres no call for them in the function, wouldn't I need to use a typedef or something like that? |
Forum: C++ Dec 3rd, 2008 |
| Replies: 4 Views: 299 for(int n = 0; n<blocksx;n++){
for(int x = 0; x<blocksy;x++){
I just want to be able to shorten this into something easy so I could just type in like one word to get it to work, it is used a... |
Forum: C++ Nov 18th, 2008 |
| Replies: 2 Views: 363 I want to be able to bring the single instance class into a function of another class without having to take each seperate little variable from the class and inject it in, can I just do something... |
Forum: C++ Nov 18th, 2008 |
| Replies: 6 Views: 364 Your question is difficult to understand, but if you mean will it construct what you have in a default constructor to each instance of said class, then yes it should. |
Forum: C++ Nov 8th, 2008 |
| Replies: 4 Views: 720 well its in the api allegro, I want two public classes to share variables and use eachothers functions |
Forum: C++ Nov 8th, 2008 |
| Replies: 4 Views: 720 Topic... just wondering if it would be friend or pointers in the main or something else... |
Forum: C++ Aug 9th, 2008 |
| Replies: 7 Views: 1,183 yeah I was just messing around with pointers, ill get rid of em and report back to you guys sometime later, its 7 am here and I'm tired as hell... Night |
Forum: C++ Aug 8th, 2008 |
| Replies: 7 Views: 1,183 I want integers 1-52 to be drawn only once, so every "card" will be seen and not one picked twice, heres the code
#include<iostream>
#include<time.h>
#include<string>
#include<stdlib.h>
using... |
Forum: C++ Aug 8th, 2008 |
| Replies: 2 Views: 534 yeah sorry guys I had been thinkin about it for a while but posting this unclogged my mind, a little snippet of how I did it
#include<iostream>
#include<stdlib.h>
#include<time.h>... |
Forum: C++ Aug 8th, 2008 |
| Replies: 2 Views: 534 All I need to know is how a good way to make sure integers between 1 and 52 wont be draw twice over in a for statement... I was thinking something like
srand (time(NULL));
int *drawn; ... |
Forum: C++ Aug 8th, 2008 |
| Replies: 13 Views: 1,267 dude you should take the time to comment your code, its really quick and goes a long way in speeding up the debug process, what class is this for, intro to C++ or an advanced one or what??? What year... |
Forum: C++ Jul 30th, 2008 |
| Replies: 14 Views: 6,488 I hate VC++, its just such a pain to get going, I perfer Dev C++ for ease of use(though it has a lame debugger) |
Forum: C++ Jul 29th, 2008 |
| Replies: 4 Views: 4,446 the criticism seemed constructive IMO, the error was blatantly obvious |