Hi Grumpy sorry for the mangled attempt at showing what i mean but it seems you have hit the nail on the head.
I will try your example, i did try a similar way but ran into errors i had pointers to...
Type: Posts; User: thestien
Hi Grumpy sorry for the mangled attempt at showing what i mean but it seems you have hit the nail on the head.
I will try your example, i did try a similar way but ran into errors i had pointers to...
Hi guys im a little stuck atm and wonder if anyone could help me :)
I have a base abstract class and 3 classes that all inherit from it. These 3 classes are all different of course.
Now what i...
ah ha it was a trivial problem after all thank you very much for your time i appreciate it :)
im sure this wont be my last problem but at least now i can advance as the base class will have at least...
at the moment i dont think it will make much difference but i am a newbie at the mo:) but i still cant get it to compile any ideas whats going wrong?
here are the errors i get
Ball.obj :...
ok i have tried to inline the constructor in the subclass decleration and tried also in a seperate .cpp file here are the actual classes if this helps
class Gameobject
{
public: //in...
it doesnt work as of yet i get a few errors
subclass error error LNK2019:
baseclass error error LNK2001:
if the code above is correct for making a subclass please let me know then i can try to...
hiya guys i have what will probably be a trivial problem for you.
i have a base class and a sub class the base constructor takes args but the sub dosent need them here is a little code to help...
hiya guys sorry if this seems trivial but ive tried all i can.
im making a tile based game/engine and have a free roaming sprite (which i will turn into a tile at a later time)
the problem is...
well if im honest i dont tab them over when i type and press enter after some things it just auto tabs it over so i think its been lazyness on my part but if 4 spaces looks neater then ill try to use...
oh super ill take all your advice into account and see how i do im gonna take a detour(testvector.cpp)
then ill rename all variables to something similar to
int nMyInt;
double dMyDouble;
oh...
oh that sounds a lot simpler than i imagined but i think i will make a test project just to get used to them. it would make my program have so less functions if i did use vecktors because i could...
thanks for the help and advice i really appreciate it.
i do plan to use vectors soon but it means more code(i think) and i wanted to get the program running smoothly first so that when i do change...
could someone please tell me how to add a zip file to this post so you can see my source files better?
ive tried the manage attachments but it does work for me?
ok im sorry to of wasted your time...
hello i have a problem with my blackjack game it was working befor i added a few new functions that allow a split to happen.
the problem is the only thing ive changed is that it now can check if a...
im not sure if this will work but try changing the .rc to .cpp
although i have no windows programming experience so i may be very wrong?
ok cool ty ill keep that in mind :)
i seem to have another problem now
if (checksplit(a.myHand[])==true)
{ some other code here
i get 2 errors
: error C2059: syntax error : ']'
error...
oh ok thanks for the advice :) its just in a book i got it says its better to pass by pointer but i must admit it sure is easy to pass most things by ref :)
im still confused how for(i=nc; i--; ) is the same as while(i != o)
is there a link you know that i could read up on that?
oh super thats good to hear :) one day ill learn how to use pointers properly then i wont need to pass by reference then right?
thanks guys thats really helpful :)
i have a fixed size array that would be passed to the function and need it to change the value.
but know i know it passes them as pointers anyway then that...
very true but as im new to this i dont understand how the condition ( ; i-- ; )
does it mean if ( i ) is one less than the previous loop?
works? perhaps ( i = nc; i>0(or how ever many loops u...
so if i remove the'&' and pass the array it will still change the value after the function has finished?
or will it be the same as passing by value?
im new to c++ myself really but i always thought that a for loop should look like this?
for(initilze;condition;expression)
so maybe it would work better as for( i = nc ; ; i-- )
maybe ive...
hiya i have a function which i need to use an array of card objects that i made but it says
error C2234: 'thand' : arrays of references are illegal
i have the same error for shand
here is my fn
...
that sounds more like what ive been trying to do except that im a novice with pointers and get lots of errors and crashes .
ill try again with pointers and see if i can get it working :)