|
It is currently Thu May 02, 2024 2:59 pm
|
Author |
Message |
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16650 Location: On a slope
|
I'm learning c++
yay, I'm teaching myself c++. So, anyway, I just coded my very first mildly useful console app and thought I'd celebrate. For anyone that remembers my windows messenger batch file, I present my windows messenger c++ executable.
I'm just posting the source code. Don't see the point in posting an executable.
Oh, btw, I'm a total C++ newb. For some of you freaks out there, if I'm doing something stupid let me konw while I'm still malleable.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Tue May 24, 2005 3:32 pm |
|
|
Rinox
Minor Diety
Joined: Mon Mar 31, 2003 7:23 am Posts: 14878 Location: behind a good glass of Duvel
|
It's crap!! Full of errors and completely lacking in shortcuts!
Of course, I have no idea what I'm taking about. Just wanted to say 'Go Satis' without being too friendly.
_________________ "I find a Burger Tank in this place? I'm-a be a one-man cheeseburger apocalypse."
- Coach
|
Tue May 24, 2005 3:38 pm |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
Well, Sat, I won't comment it much. You should almost allways avoid using of labels-goto statements. Insted, in this case, you can very good use while with break and continue. Take look at the code down, it is supposed to be equivalet of code of yours, through I'm not 100% sure.
I'd suggest you to start with the simplier things, so you can first learn what is available for use. As well - take a look at the documantation for all avalilable methods, whatever C++ template/object you use. You can take a look at the places such as this
http://www.cs.waikato.ac.nz/~marku/progcomp/
for example.
_________________ ++
|
Tue May 24, 2005 4:43 pm |
|
|
Mole
Minor Diety
Joined: Fri Apr 11, 2003 5:09 pm Posts: 4003 Location: Walsall, West Mids, UK
|
I FUCKING HATE YOU.
I too am teaching my self c++. Look what you managed to "whip up"?! I took me long enough to do an addlibs program!
Took me forever! But I'm working on a small game right now. I guess it helps that you have some coding knowledge to begin with, where as I have none. And goto statements are bad. Use "while" instead, to exit "while" use "break;"
edit: Shit, some one already posted that. That's what you get for skimming.
I'm having problems with include files etc, which I'm slowly working out, but bleh to it for now.
_________________ Games to complete: GTA IV [100%] (For Multiplayer next!) Fallout 3 [50%] Rock Band [35%] http://www.cafepress.com/SmeepProducts
|
Tue May 24, 2005 4:59 pm |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
Oh, forgot to give one fine online reference http://www.cppreference.com/
_________________ ++
|
Tue May 24, 2005 5:21 pm |
|
|
Mole
Minor Diety
Joined: Fri Apr 11, 2003 5:09 pm Posts: 4003 Location: Walsall, West Mids, UK
|
_________________ Games to complete: GTA IV [100%] (For Multiplayer next!) Fallout 3 [50%] Rock Band [35%] http://www.cafepress.com/SmeepProducts
|
Tue May 24, 2005 6:57 pm |
|
|
derf
Minor Diety
Joined: Fri Apr 11, 2003 2:17 pm Posts: 7721 Location: Centre of the sun
|
lol GFree PwNz Satis!
_________________ "Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson
|
Wed May 25, 2005 4:21 am |
|
|
ElevenBravo
King
Joined: Wed Apr 16, 2003 2:18 pm Posts: 1976 Location: Sexy Town
|
/golf clap
_________________ Contrary to popular belief, America is not a democracy, it is a Chucktatorship.
|
Wed May 25, 2005 7:17 am |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
Nothing more
_________________ ++
|
Wed May 25, 2005 8:54 am |
|
|
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16650 Location: On a slope
|
goto is bad? I was reliving my BASIC days.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Wed May 25, 2005 10:16 am |
|
|
derf
Minor Diety
Joined: Fri Apr 11, 2003 2:17 pm Posts: 7721 Location: Centre of the sun
|
Yet again, i fail to understand one of Gfree's posts.
_________________ "Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson
|
Wed May 25, 2005 11:44 am |
|
|
Franny
Marquis
Joined: Tue Jun 10, 2003 11:08 am Posts: 940 Location: over there
|
don't worry your not alone...
_________________ Give a man a fire, he'll be warm for a night.
Set a man on fire, he'll be warm for the rest of his life. - Satis Clankiller
|
Wed May 25, 2005 4:09 pm |
|
|
RB
Emperor
Joined: Wed Apr 16, 2003 1:25 am Posts: 2560
|
Löl, guys, it was not my intention... just relax . That was the point of it.
_________________ ++
|
Thu May 26, 2005 5:34 am |
|
|
derf
Minor Diety
Joined: Fri Apr 11, 2003 2:17 pm Posts: 7721 Location: Centre of the sun
|
*fists GFreeman*
_________________ "Well a very, very hevate, ah, heavy duh burtation tonight. We had a very derrist derrison, bite, let's go ahead and terrist teysond those fullabit who have the pit." - Serene Branson
|
Thu May 26, 2005 6:35 am |
|
|
Satis
Felix Rex
Joined: Fri Mar 28, 2003 6:01 pm Posts: 16650 Location: On a slope
|
fists?
Anyway...y'know...c++ kinda sucks. Maybe it's just a lack of great documentation, but php is so much more malleable. I keep running into data incompatability problems with C++ (using functions that requre char when I have a string and vice versa) and I have a hell of a time figuring out how to convert back and forth. Maybe there're functions for this, but damned if I can find them. And why use char at all, when string is so much easier to work with?
Anyway, I may just build some functions of my own to convert between the two data types. I think my biggest frustration right now is figuring out the functions in c++ to do the things I want to do. Once my knowledge expands some, hopefully I'll groove into it like I did with php.
_________________ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.
|
Thu May 26, 2005 10:32 am |
|
|
Who is online |
Users browsing this forum: No registered users and 5 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|