thank you, this was just what I needed.
Type: Posts; User: LAURENT*
thank you, this was just what I needed.
const int itemNumber = 8;
cin >> quantity[itemNumber
What you're telling the computer to do is access the 9 th element of the array, but the array only has 8 members. Array start their count at...
Hello, I want to use abstract base classes in my code but I'm having trouble doing this. I keep getting an error that say my derive constructor already has a body. I need to initialize the variables...
Why didn't you define the quantity elements like you did the price? Also weren't they arrays? You're not specifying which element in the arrays your multiplying.
Well personally the 2 main things I use are struts and classes. I know their pretty much the same but I like use them for conceptual naming convinces.
I want to have a class for each enemy in my game but I do not want to create an array of pointers for each enemy class to spawn them. How can I use only one class to use multiple classes?
Yeah, you should upgrade. Nobody uses that anymore. I think you should try to learn c++ directly and use this site's tutorial to cover the basics of c++.
I highly recommend not practicing...
It's int to a string. meh, I tried kinda..... I was a bit too quick and dirty with this.
Like this. The functions only goes up to the hundreds because that's all I need for now. If I needed to go higher, all I would need to do is add a bit more to the function and Walla, I can convert...
Too late, I already coded up the function and it works..... well only up to the hundreds digits, can't go pass thousand. I only need to convert every number between zero and twohundred. I'll don't...
blaaaaaaa......
I don't want to upgrade yet, I suppose it wouldn't be too hard to write a string reading function that uses number scale logic. All I would need to do is add the number the string...
I don't think I have this, but I really don't know c++11 is either. If it helps I use visual studios 2010
I need to convert an int to a string. I'm not sure how to do this. I was thinking to just print a string base on value of a int variable but I knew there was a better way...... I hope.
Any tips?
Vote for this thing below please
http://vignette3.wikia.nocookie.net/archiecomicssonicfanon/images/b/be/Blaze235345.png/revision/latest?cb=20120713210026
SEGA Blog | The Sonic Showdown heats up!
I know how to skip lines whiles reading from a file but I don't know how to skip during the writing. Can lines in a file be skipped while writing to them or would I need to rewrite exactly what I...
I just noticed the real problem. It was a problem with a function argument. Apparently I wrote something like this.
Void function (Class *square)
{
//Stuff goes here
}
Instead of
I want some of my pointer to point to NULL but I'm not sure if this is possible. Does anyone know how I can define a pointer to NULL? I kept getting this error somewhere else in my code when I...
All of the art is mines. During my high school days I was artist but that craft started to bore me.
Nope, not giving those away. I made an exception with the resources thought.
Hi.
I've been making a game but school isn't starting now. I decided to show what I got.
INSTRUCTIONS
Step 1: open prototype file
Step 2: open second prototype file
Step 3: Open...
One last question before more testing.
I heard virtual function might be a bit slow, is there anyway to tell the compiler to only check for certain functions. Only groups of virtual functions...
Do you define virtual functions in the base class or simply just declare them and let it be defined in the derive class?
I plan to create a base class for multiple similar classes to derive from it. What I'm trying to do is have multiple playable characters but I don't know how to approach this in c++.
Here is a...
The goal was to replace the dynamic array with a vector and to create a vector of class objects. This statement below is the sole cause of me wanting to use a vector with the belief I'll get the...
I don't think I'm trying to do polymorphism. Aren't dynamic arrays suppose to be similar to vectors? Well I had a problem a while ago with a dynamic array only applying the results of a conditional...
I've been really busy but managed to get in enough down time to learn somewhat decent info about vectors. Anyways originally my program created a dynamic array of pointers to class objects and I came...