Ok, i think i get it now but wount be able to check for a while... my brother spilled water all over my computer and its not working anymore so im on a windows labtop without a compiler... im going...
Type: Posts; User: Goosie
Ok, i think i get it now but wount be able to check for a while... my brother spilled water all over my computer and its not working anymore so im on a windows labtop without a compiler... im going...
i tried that, i think... or else i just got what you said confused and checked something else... sorry about that...
Ok, i got it to work, so i saved the copy giving me problems and im going to google it and try to figure out why its not working... but on another copy i made it all 1 function and it works...
I tried added Person &P in the parameters on the top and it gave a lot more errors than i started with... :(
EDIT:
yours didnt work either stoned... functions seem to really hate me...
EDIT...
oh yea, this is the error i get... sorry, i forgot to post it...
[montez@localhost montez]$ c++ class.cpp -o class -O2 -Wall
class.cpp: In function `int main()':
class.cpp:5: error: too many...
^didnt work, so I tried taking it out of the class and i still get that error... hhmmm...
Ok, here is another one, but im getting errors (i know its trying to call the class in the function but im not getting it... i called it exactly like i did the last one...)
#include <iostream>...
so it would be easier to put the classes in a header file and just not use structures? or can structures be used in header files too? i havent seem any like that yet... (BTW ive never made my own...
Ok, im working on classes (since i abandoned my MUD codebase until i can actualy use C++) but im a tiny bit confused on the constructor and destructor... i dont know how to add arguments yet so im...
Ok, I think im getting it now... im going to google this and read up on it more tho. thanks for the help everyone :D but theres 1 thing i dont get still... why does it do this?
int main() {...
ooohhh... that makes sense now... thanks for the help :D so i only need to put a 'Stats &S' in functions that use it? for some reason i was thinking they all needed it :) oops...
im getting this now when i try to put it throughout the code...
[montez@localhost codes]$ c++ game.cpp -o game -O2 -Wall
game.cpp: In function `void intro(stats&)':
game.cpp:29: error: syntax...
Joshr, thanks for telling me that, im trying to make it work throughout my program (added a LOT more...). Seems like it'll save me a lot of time... :D
Its only single player, so i did want it all to be in the same structure. Like i want to define the default stuff in the int main() (money, weapon, ect...) and be able to change it through diffrent...
hehe nevermind... i wasnt thinking, sorry... just add stats player; to the void and it works... :D thanks for the help
how do i pass the player variable to the function? sorry for sounding dumb, im new to coding... could i make a pointer to "stats" called S and make it:
void name(&S)
<code>
?
Ok, i switched from coding a MUD to a regular text based game... I decided to use a structure to hold the player information, and anything that you can fight (trying to keep organised, and easier to...
yea, im starting to figure it is a little over my head for right now... so i deleted what i did (that way i wount go straight back to trying to work on it... i have a habit of not leaving stuff...
:-/ i didnt think of posting it there... figured im writing in C++ and this is the C++ part of the forum... dang... i had started of thinking about switching to C, then looked at a C codebase and...
sorry for being a bother about this but ive been trying to get this to work for 2 days now... currently my MUD will only connect, nothing else... it connects and sits there doing nothing... ive been...
ok, using cout or fsprintf or sprintf dont work either... and i'm still looking through code and seing the same code again... and im trying to find were the wrote how to send it and still cant find...
Ok, i made a MUD server (it actualy connects!) but cant figure out how to make it send text to the person connected to it... i tried using
Send("text");
and it keeps saying that it doesnt...
I GOT IT!!! WOOOHOOO!!! now i can get back to coding my MUD! :D
:-/ i know its mysql-dev that has the file but i cant find a copy of it for mandrake...
Ok, i found what package has it... just got to download it now