Oops, sorry. Thanks for correcting me...
Type: Posts; User: muggizuggi
Oops, sorry. Thanks for correcting me...
You are missing the type declaration in this line:
for ( i = 1; i < size; i++ )
I suggest you make the function accept the array as an arguement, and then test each cell against the next, from one end, using a separate variable and if statements. then you could simply output it...
Hmmm...
I'd say you should probably look into strings... :)
Hi there,
I had a lot of questions about exactly that, not too long ago.
That is, until I found out how many more questions I really had, about game structure, and C++ programming in general.
...
Thanks alot!
Lots of good info, especially those links!
Everything is relative.
It all depends how complicated programs you intend to do, and obviously, how talented, motivated, and dedicated you are. That said, I don't think, in most cases, anyone will...
Try this:
#include <iostream.h>
#include "menu.cpp"
using namespace std;
int main()
{
int answerget;
startmenu();
Aahhh! Back from vacation. :cool:
Now my skin is a slightly less pale shade of blue.
Eh... How am I going to milk you of all your good info, then? Poor suggestion, that one! :p
Dae, I have...
Hello again,
This is just a quick post to tell you all that I am still working hard on the homework that you have already given me. :)
Thank you all so much!
Especially you, Dae, for spending...
Well, what I did was going through tutorials on the net. That means, I actually wrote and compiled the code in them, instead of just reading them. Be careful in your selection of tutorials, as many...
Wow, 7 answers already, with lots of good info! Many thanks to all of you.
I will try to answer all of you, and implement any correction I feel I understand.
Lets start from the top:
...
I have previously had some questions about classes and references/pointers on this forum. And - I got some good answers, mainly from major_small and Dae. Thanks to both of you!
Now, as it often is...
Why don't you make your struct a class, and then include the function as a method of that class?
Just a thought from a noob.
Eh, not to pretend to know anything, but isn't DirectSound a part of DirectX, thereby "native" to Windows?
setprice() is not a method of your house class. You must mean the one you called priceset(), right?
A really good way to avoid this kind of error is to use the >new word = capital letter< naming...
Ok Major, I slept on it and I think I see your point.
Doing it like that (creating and deleting pointers/references all the time) can get messy, and may also take its toll on the CPU, once I get to...
Thanks alot Major! :)
Yup, I know about memory leaks... So this is how they happen? Didn't Windows have some? ;)
Couldn't you just destroy all pointers in the end of the funktion that uses...
OK, kewl. So that is how it is done.
Then I hear that they have to be destroyed again, or the undefined "danger" will arrise...
Does that mean the pointer/refference itself or the entire object?...
Hi there, I'm new. :)
I search the c++ forum for "class", pick the first topic, and what do I find?
Someone with the exact same problem I am having!
I am writing a texst/rpg-type game, and I...