Okay, I didn't put the parenthesis in the showStrength thing where I pass the arguments for levelUp()'s paremeters, but I'm still getting the same problem. Here's the update of my code. What in the...
Type: Posts; User: nickodonnell
Okay, I didn't put the parenthesis in the showStrength thing where I pass the arguments for levelUp()'s paremeters, but I'm still getting the same problem. Here's the update of my code. What in the...
Okay, I added the reference operator to the string. Here are my compiler errors.
invalid initialization of reference of type 'int&' from expression of type '<unknown type>'
passing argument 1...
Alright, new problem. I didn't do the structure thing, instead I just made a levelUp function.
However, when I try to put in the strength and stats values, I, er... get a compiler error.
Here's...
Hmm, so you can actually create a structure within a function? So like, if they choose dwarf the StatIncrement.iStrength inside the struct would increase the stats in the class with the function? ...
C++ isn't windows. It takes a LOOOONG time to be able to make useful window apps. You start by learning the basics (and a hangman game isn't as simple as it seems). Basically, you have to learn...
I know this problem's fixed, but just to clerify things, flicka, whitespace in your coding doesn't matter. You could have used
cout <<
"Text Here" ...
Hmm, okay I think I need to read some more before I attempt this. Thanks for those tips, though. Before I go off to reading again... you're saying instead of making an instance for each race, I...
I'm not entirely sure, but change
if (*grade >= 0 && *grade <= 59)
{
std::cout << "The grade is an F.";
}
to
I'm wanting to add a levelUp function to my code, but I'm not exactly sure how to go about that. I'll post the code real quick and continue why...
#include <iostream>
#include <string>...
#include <iostream>
using namespace std;
int main()
{
int select; //the actual selection you'll be inputing
int selectCount = 0; //you'll see why i made this later. make sure it's...
#include <iostream>
using namespace std;
//START STATS CLASS
class Stats
{
public:
Stats();
~Stats();
Thanks for all the help. I've been searching for reference tutorials that are good, and I've came up pretty much empty handed so far. I happened to be in Jonesboro yesterday and bought a book on...
Well if you're pretty new, I'd suggest familiarizing yourself with the language throuroughly first (which... you've probably heard before, right?). I'm new as well, and the only time I think about...
I think he was serious. He meant write something to check and see if the file plays, and if not bla bla...
Yes, in my ever-stubborn quest for C++ knowlege, I have begun messing with structures (in which I should have before classes).
I have a problem, though. I have declared variables in the...
I don't know if it'll work right, but I came across this about a week ago.
http://www.ticalc.org/archives/files/fileinfo/315/31522.html
I only know of a Java to C converter. Would that work for you?
Alrighty, I'll get the rest posted when I get it done. Thanks for the help so far.
Whoa... it's late and my brain hurts. Thanks, though. I'll try to fix it.
Here's the code:
stats.h
class Stats
{
public:
Stats();
~Stats();
Show transport.h please, and maybe I can try and help.
OK sounds good. I know it may be overdoing it a little, but is there anyway I could do a subclass of class Hero for each character class? (hehe, confusing)
Like this:
class Stats:
class...
Thanks, yeah, I'm really getting into classes and inheritance. Thanks for the tips.
Edit: Just so I understand a little better...
class Stats
{
public:
//stuff
Any tips on how I do that? I've only been programming for three days, so I'm not exactly familliar with the language yet. Also, eager to learn!
Edit: Nevermind, beat me to it.