Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / my new game, hit or check, made in c++

Author
Message
The resurrected anarchist
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location:
Posted: 11th Apr 2006 23:17
ok, wernt sure were to post this, but i think here is best.

i have just started learning c++, i am still a newb, and this is my first game!

try it out, see what you can score, i did it in 2 goes! (jammy)

here is the
and the exe is included.

cheers

Attachments

Login to view attachments
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 11th Apr 2006 23:20 Edited at: 12th Apr 2006 20:11
Ok, I'm not exactly amazing at C++, and I'm pretty new to it aswell - but what is the point in doing:



when you could just do:



Is there some advantage to doing it with the square-brackets as if its an array, or is this simply a meaningless mistake? (I'm sure there's 0 point to using [] with blanks if the integer isn't an array)

Quote: "Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all."

Attachments

Login to view attachments
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 11th Apr 2006 23:21 Edited at: 11th Apr 2006 23:24
Sorry, but when I compile I get:

114 error(s), 1 warning(s)




Works fine in Dev-C++ though. And as far as I know, the [] after the variables are just annoying to look at. But is it more efficient to do so?

The resurrected anarchist
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location:
Posted: 11th Apr 2006 23:36
yea, its made in dev c++, i only had the [] in coz the book im learning from had em in, thought they were needed.
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 11th Apr 2006 23:41
Square backets generally mean that the datatype is an array. In C++, as there is no native string type, you have to use char arrays to store strings; you probably copied this.

The resurrected anarchist
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location:
Posted: 12th Apr 2006 00:07
so i was right to use them?
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 12th Apr 2006 01:16
Dang! After I compiled your program I get 114 errors no matter WHAT I'm compiling! Even the simlplest "Hello World" app. I've tried to run a repair, but it didn't help. Doing a clean re-install now.



The resurrected anarchist
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location:
Posted: 12th Apr 2006 13:16
do u think thats because of mi program??

RUN IN DEV-C++
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 13th Apr 2006 02:46
I can't see what else it could've been. Before I tried to compile your program, I could compile all my apps just fine, no errors whatsoever. After I compiled your app, I got 114 errors, permanently, if you can say so. It worked again after reinstalling vc++, so no worries!

Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 13th Apr 2006 12:16
Klu 007 you sure the project wasn't still open in the background

Theme park simulator wip

The resurrected anarchist
18
Years of Service
User Offline
Joined: 5th Apr 2006
Location:
Posted: 13th Apr 2006 13:37
yea, it does that wid dbp to me sometimes, find them in task manager, but u cant end em

sorry anyway.
Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 13th Apr 2006 13:45
I compiled it, and it looks kewl, I hate code cracking games, but its good, I think I'd better get back to some C++ and C#


K I changed my name into a famous Samurai, but meh! Seppuku got boring after a while

Login to post a reply

Server time is: 2024-11-16 21:25:26
Your offset time is: 2024-11-16 21:25:26