I want to learn C++ for Windows. I went to Barnes & Nobles, but they didn't have The Complete Idiot's Guide to C++, so I got C++ For Dummies. I started reading the book, BUT it's for programming DOS programs! NOT Windows! They also had Visual C++ 6 For Dummies, but I've read that it got real bad reviews. HELP! I want to learn C++ for Windows, not DOS. I want to use a compiler that runs in Windows, not DOS. Please respond ASAP. I'll be going to Barnes & Nobles soon to return C++ For Dummies.
C++
just get loads of tutorials off the net, 'its free'
It's easier with a single book that comes with a CD. I'd rather do it that way.
I wouldn't.
Well, what book would you recommend and/or what tutorials?
Get a book on Visual C++, not C++. I happen to own Visual C++ 6.0, so it made sense to buy a book strictly based on "Visual C++ 6.0".
But I also own the old Borland C++ (can't remember the ver.). Programming for DOS is cool.
The syntax for C++ is nearly the same, regardless if it's Visual or not.
But I also own the old Borland C++ (can't remember the ver.). Programming for DOS is cool.
The syntax for C++ is nearly the same, regardless if it's Visual or not.
C++ is not for dummies.
And you SHOULD learn first in DOS and then dream about moving on to Windows, it's plain old STUPID to try to learn C++ with a Book That teaches MS Visual C++ (a program, not a language), because it will assume you already know C++, so:
"The syntax for C++ is nearly the same, regardless if it's Visual or not."
Makes absolutely no sense because Visual C++ is just the name of Microsoft's compiler. There is no Visual C++ language, smart guy.
I assume you want to learn C++ because you already know C, so here's a great site for that:
http://www.icce.rug.nl/docs/cplusplus/cplusplus.html
But after reading it you should get a real book because it's not very very complete.
Last modification: CARPEDIEM - 03/31/01 at 12:58:36
And you SHOULD learn first in DOS and then dream about moving on to Windows, it's plain old STUPID to try to learn C++ with a Book That teaches MS Visual C++ (a program, not a language), because it will assume you already know C++, so:
"The syntax for C++ is nearly the same, regardless if it's Visual or not."
Makes absolutely no sense because Visual C++ is just the name of Microsoft's compiler. There is no Visual C++ language, smart guy.
I assume you want to learn C++ because you already know C, so here's a great site for that:
http://www.icce.rug.nl/docs/cplusplus/cplusplus.html
But after reading it you should get a real book because it's not very very complete.
Last modification: CARPEDIEM - 03/31/01 at 12:58:36
I completely agree with CARPE. Getting a Visual C++ book will teach you how to use the compiler, not the language. You need to know the commands and understand the language. You don't need a windows programming book, the differences can be learned in a day, and DirectX tutorials are all over the internet.
Warren, This is exactly why I told you what order to get the books in. The second one in the list, the Game Programming for Windows, will teach you everything you need to know about windows programming.
You can't get everything from one book, you have to progress. This is like thinking you can learn everything in a class in one week, it won't happen. Step by step...
Warren, This is exactly why I told you what order to get the books in. The second one in the list, the Game Programming for Windows, will teach you everything you need to know about windows programming.
You can't get everything from one book, you have to progress. This is like thinking you can learn everything in a class in one week, it won't happen. Step by step...
I know, I realized that when reading the back of the Visual C++ books. I went to Barnes & Nobles today to return C++ For Dummies (on the reviews I've read of it, it's rated one of the worst, typos on everything in the book), and I got 2 books. The Complete Idiot's Guide to C++ by Paul Snaith (rated one of the highest) and Sam's Teach Yourself C++ in 10 Minutes as a reference book (rated also one of the highest). B&N didn't have them, but I still ordered them and they'll come in 4-6 business days (4-6 business days! sheer torture!). When I'm done with all that, I'll know all the basics of C++, and be able to write games. I'll then get Trick of the Windows Game Programming Gurus by Andre Lamothe. This book is the big a** book, 1000 pages! B&N had one at the store, and it's huge! With that, I'll learn the details of C++ and of course, game programming, because I'm planning on making a multiplayer mod for Half-Life (you know, Counter-Strike, Team Fortress, FireArms, Front Line Force... if you know Half-Life multiplayer, you know the millions of mods). Then after that big a** book, I'll get PC Programming to learn to make and port games to WinCE PPC. Perhaps I'll even work for id Software, programming some new Quake 4 engine and making the maps...well, maybe just the maps, that's my real skill.
Hey, maybe I can make maps for Doom IV! That would be awesome! I'm not planning on doing anything around programming, mapping, or anything around computer gaming for a career. I pretty much know what I want to do for a career, but game programming and mapping may be a side job. But first, I've gotta learn C++! And I may have to wait an ENTIRE week for the books to arrive at Barnes & Nobles!! AHH! Well, I did get a discount on the books because I have to wait, so that's good. 
Yeah, and i want to marry Pamela Anderson, Own Microsoft, Be President of the whole world and build a star ship to travel to foreign worlds where no man has ever gone before and discover alien life forms. And build an artificial life form that would take over the whole galaxy and shit. I also want to become a rock star and score with many chicks at the same time.
Lol, You guys really are something!!.
Last modification: CARPEDIEM - 03/31/01 at 16:14:59
Lol, You guys really are something!!.
Last modification: CARPEDIEM - 03/31/01 at 16:14:59
Hey, I want to be a rock star too. But that's kindof irrelevant. Come on Carpe, you're being a little harsh for someone that had to take shit from Dan, randall and Mark(killzat) for being a newbie programmer (even though you weren't that new and you are/were quite good) only a couple months ago. These guys are just aspiring programmers and you're talking them down so that they won't want to be one after they write their first hello world application and think its too much work. So instead of calling them morons for wanting to know how to program, you of all people, should be trying to encourage them, and not talk about Pamela anderson... besides she's getting old anyways, and her implants are gone 
CARPEDIEM, what was that about? Are you trying to discourage me from learning to program? If you discourage everyone who wants to learn to program, then there'll be no programmers! It is quite disappointing when I read your post. I'm excited to learn C++, and then you laugh at me. Now I'm going to go up to my room and cry my heart out because of you. Well, maybe not... Remember, YOU were a newbie programmer at one time, and did anyone discourage you? I'm going to learn C++ and you can't stop me because you're not the boss of me (it's funny using kiddy language).
It's called "Tough Love" people
Fuhgedabowdit
Fuhgedabowdit
1) Pam Anderson is not attractive
2) Own microsoft? Just take his money, owning the company would be miserable
3) President of the world? That's my job, but I'm the supreme dictator of the world. You may call my Mr. Dictator Sir
4) I've already been to Alpha Centauri. The plants are purple (binary white dwarf stars do that) and the mind worms are a nuissance.
Warren, why didn't you just order them using the Amazon.com link I gave to you in the other thread. If you clicked on the name of the book it would have taken you there.
Warren, that game programmers book I told you about, it comes with Visual C++ 6.0 on the included CD for free, why not get that so you can actually do what the book is telling you.
2) Own microsoft? Just take his money, owning the company would be miserable
3) President of the world? That's my job, but I'm the supreme dictator of the world. You may call my Mr. Dictator Sir
4) I've already been to Alpha Centauri. The plants are purple (binary white dwarf stars do that) and the mind worms are a nuissance.
Warren, why didn't you just order them using the Amazon.com link I gave to you in the other thread. If you clicked on the name of the book it would have taken you there.
Warren, that game programmers book I told you about, it comes with Visual C++ 6.0 on the included CD for free, why not get that so you can actually do what the book is telling you.
Ok, Moose Master (Mr. Dictator Sir), I'll get Tricks of the Windows Game Programming Gurus off of Amazon. I got the 2 other books from Barnes & Nobles cheaper than Amazon's prices, because they had to order them. The Complete Idiot's Guide to C++ comes with a CD, but I'm not sure if it's Visual C++. C++ For Dummies came with GNU C++, which only works in DOS and can only do DOS programs. I never installed it though, because I knew I was going to return it. I saw on Amazon that the real full Microsoft Visual C++ 6.0 is $250! How can the game programming book come with Visual C++? Is it Microsoft's, a trial version, or some other brand? Oh, and Moose Master, I did click on the links to go to Amazon, read all the reviews, and compared prices. I know that Tricks of the Windows Game Programming Gurus's CD come with some source codes of some games. Do you know what source codes are on the CD?
Smart guy? You know the differnce between SPEAKING english and UNDERSTANDING english are two differnt things. Apparently someone needs to get off their high horse. Syntax for Visual C++ and C++ is nearly identical BECAUSE THEY ARE THE SAME DAMN HIGH-LEVEL LANGUAGE.
I suppose I could ramble on-and-on trying to show off EVERYTHING I know, and get to in-depth detail about everything. But that's bullshit and no-one is going to read it (not that they read my crap anyway).
Anyway, yes I agree learning to program in DOS would be best.
I suppose I could ramble on-and-on trying to show off EVERYTHING I know, and get to in-depth detail about everything. But that's bullshit and no-one is going to read it (not that they read my crap anyway).
Anyway, yes I agree learning to program in DOS would be best.
Thanks Carpe, that's much better~, that's exactly what I was looking for~.
I'm not going to start blaming things on stereo-typed views of others' countries, but I will say this: if you want to learn any programming language good, start now. Perseverence is the only way to become a good programmer. And if you want to be a good programmer, so be it, you can. If you suck, then you probably won't. So just don't think you suck, and make yourself better. And even if it takes you until you're 50 years old before you put out that f'in program or OS, just remember that you took the time to do it, and you didn't waste it screwing whoever to get... where? Sorry, if this sounds a little idealistic, but I am an American.
I'm not going to start blaming things on stereo-typed views of others' countries, but I will say this: if you want to learn any programming language good, start now. Perseverence is the only way to become a good programmer. And if you want to be a good programmer, so be it, you can. If you suck, then you probably won't. So just don't think you suck, and make yourself better. And even if it takes you until you're 50 years old before you put out that f'in program or OS, just remember that you took the time to do it, and you didn't waste it screwing whoever to get... where? Sorry, if this sounds a little idealistic, but I am an American.
Lol randall. I just love getting even with you, and what's best is that i always can make you mad.
Why don't you just recognize that you've been a prick to me and that i gave you no reason for being like that. and we both make peace ok?.
Hey moose, why don't you do the same and we make peace too?.
These last days i've been a prick with you guys because i just felt like getting even.
Why don't you just recognize that you've been a prick to me and that i gave you no reason for being like that. and we both make peace ok?.
Hey moose, why don't you do the same and we make peace too?.
These last days i've been a prick with you guys because i just felt like getting even.
Well, when we have people like Shawn Fanning creating Napster at 17-18 years old, that says alot of SOMETHING about the USA.
American egos? what the hell is that about. The largest ego around here is from Argentina.
I was correct that Carpe is a college student. That wasn't a GUESS. I see people like him all day long, tauting their "latest" programming knowledge like this is something THEY invented. They know EVERYTHING and you can't convince them otherwise.
It doesn't take a programming wizard to make fun of non-coders. Even an person who read three chapters of the "The Idiot's Guide" could accomplish that.
I work in the IT (Information Technology)industry, and unlike some people I don't feel the need to toss around BIG keywords that will confuse the hell out of everyone. It's all about communication, and if you can't do that, no one is going to hire you REGARDLESS of your skills.
At least that's the way it works in the USA. Apparently Argentina does it differently; the only way you can be on top is to ridicule.
American egos? what the hell is that about. The largest ego around here is from Argentina.
I was correct that Carpe is a college student. That wasn't a GUESS. I see people like him all day long, tauting their "latest" programming knowledge like this is something THEY invented. They know EVERYTHING and you can't convince them otherwise.
It doesn't take a programming wizard to make fun of non-coders. Even an person who read three chapters of the "The Idiot's Guide" could accomplish that.
I work in the IT (Information Technology)industry, and unlike some people I don't feel the need to toss around BIG keywords that will confuse the hell out of everyone. It's all about communication, and if you can't do that, no one is going to hire you REGARDLESS of your skills.
At least that's the way it works in the USA. Apparently Argentina does it differently; the only way you can be on top is to ridicule.
Come ON GUYS!!, It's saturday night!!!, Am i not allowed to have some fun or what???.
I just thought it was a little funny that you wanted to make a 3d engine for ID software just by reading two books, one called:
"C++ For dummies", and the other one:
"The Complete Idiot's Guide to C++ ".
I mean... what kind of name for a book is that???.
I don't want to discourage anyone, it's just that im studying software engineering and i realize the incredible complexity of it my career, Would you believe me if i told you that perhaps it would take you 3 lifetimes to make the Windows 2000 OS?, And GOD, you'd better love advanced Algebra if you even mention the word "3D engine".
Before i started college i was a BIT, like you... but believe me when i tell you that just a very very little bit like you. You guys are like me when i was 17 but elevated to the power of (99x99^99)!
= CENSORED BYMYSELF =
So, it might not sound funny for an american, but it sure as hell is for an argentinian to think that you can be a lead programmer for ID software at the age of 14.
All i can say... is that if you ever plan on doing something REALLY REALLY great, don't think you can do it all by yourself, get a team and start working. The sooner you understand you are not god, the sooner you start reaching your goals.
A word of advice?, Start with Visual Basic, so you don't get frustrated and can make nice window appz, then, if you really like programming move to C, then if you want to to C++. And if you still like it learn Assembler.
Let me tell you that MS Visual C++ can be VERY frustrating for a guy that actually CAN program in C or C++. It takes time to learn how to use it well, i still can't. So, believe me when i tell you that MS VC++ is gonna rip all your programming dreams away if you plan on start learning how to program with it.
Last modification: CARPEDIEM - 03/31/01 at 18:45:38
I just thought it was a little funny that you wanted to make a 3d engine for ID software just by reading two books, one called:
"C++ For dummies", and the other one:
"The Complete Idiot's Guide to C++ ".
I mean... what kind of name for a book is that???.
I don't want to discourage anyone, it's just that im studying software engineering and i realize the incredible complexity of it my career, Would you believe me if i told you that perhaps it would take you 3 lifetimes to make the Windows 2000 OS?, And GOD, you'd better love advanced Algebra if you even mention the word "3D engine".
Before i started college i was a BIT, like you... but believe me when i tell you that just a very very little bit like you. You guys are like me when i was 17 but elevated to the power of (99x99^99)!
= CENSORED BYMYSELF =
So, it might not sound funny for an american, but it sure as hell is for an argentinian to think that you can be a lead programmer for ID software at the age of 14.
All i can say... is that if you ever plan on doing something REALLY REALLY great, don't think you can do it all by yourself, get a team and start working. The sooner you understand you are not god, the sooner you start reaching your goals.
A word of advice?, Start with Visual Basic, so you don't get frustrated and can make nice window appz, then, if you really like programming move to C, then if you want to to C++. And if you still like it learn Assembler.
Let me tell you that MS Visual C++ can be VERY frustrating for a guy that actually CAN program in C or C++. It takes time to learn how to use it well, i still can't. So, believe me when i tell you that MS VC++ is gonna rip all your programming dreams away if you plan on start learning how to program with it.
Last modification: CARPEDIEM - 03/31/01 at 18:45:38
Oh Carpe, beso mi culo.
I don't need to make peace with someone like you.
I don't need to make peace with someone like you.
Guess what CARPEDIEM, I'm not American! LOL. I'm Israeli. I live in America now, and well, I want to move out. From a foreigners few, Americans have the lowest work ethics I've ever seen (no offense to anyone who works hard), and are racist to anyone from any other country (I see this every single day). I was pretty much kidding about programming for id, but I am a very good mapper. I'm only doing this C++ thing for a hobby. Like how mapping is a hobby. I don't plan on writing the next hot gaming engine, like the Quake 3 engine. I at least want to be able to make Pacman. I really want to be able to make mods for first person shooters (Half-Life mainly).
Ohhh fuck you very much randall, you just described me as one of the persons i dislike the most in this world. I would hate it if you were right, I do my best to avoid thinking that im better than someone else.
Really, don't say that because it fucking sucks, im not like that, you son of a bitch, it's you that always has some some shit to say so that people think you are a smart guy. So this time i took the liberty of laughing in your fucking face Alright?, live with it you fag.
Really, don't say that because it fucking sucks, im not like that, you son of a bitch, it's you that always has some some shit to say so that people think you are a smart guy. So this time i took the liberty of laughing in your fucking face Alright?, live with it you fag.
Yeah, sorry warren, you are cool.
I'm a big fan of Counterstrike, So if you ever figure out a cheat let me be the first one to test it!!
I've been in Boston for 3 months and i got the same feeling that you have. Americans are so much different than we are.
But heck, im sure i would be like that if my country was the number 1 of the world right?. That's the price they pay.
I'm a big fan of Counterstrike, So if you ever figure out a cheat let me be the first one to test it!!
I've been in Boston for 3 months and i got the same feeling that you have. Americans are so much different than we are.
But heck, im sure i would be like that if my country was the number 1 of the world right?. That's the price they pay.
Guess what again CARPEDIEM, I live in Boston!!! LOL! Oh, and I hate Counter-Strike cheaters. I'm currently making a map for Counter-Strike and am going to submit it to the Counter-Strike team, but I've just barely started it. I'll probably do it over the summer because I barely have time, with the C++ thing too. That's why I want to make my own mod. I already know exactly what the mod is, but all I'll say is that it's off of the movie Gladiator.
Once again, Carpe I could care less. I don't display my full vocabulary of computer knowledge because not everyone can understand it. I work in IT, which requires me to speak in laymans terms whenever possible in order to get communication across.
There is an overwhelming number of foreigners in IT. I can't tell you how many startups and established companies I have walked into and their companies are treated as "exclusive clubs". Half of them are owned by ex-Microsofties who earned their millions and bailed. So they treat anyone who isn't a Microsoftie like crap.
And the "perfect" schooling must be established. Anything less than MIT is crap to them.
This doesn't affect me, since I already have a job. It is sad for those truly talented individuals who deserve a chance to really shine within a company.
Interesting, I should be in Boston next month to visit a client.
There is an overwhelming number of foreigners in IT. I can't tell you how many startups and established companies I have walked into and their companies are treated as "exclusive clubs". Half of them are owned by ex-Microsofties who earned their millions and bailed. So they treat anyone who isn't a Microsoftie like crap.
And the "perfect" schooling must be established. Anything less than MIT is crap to them.
This doesn't affect me, since I already have a job. It is sad for those truly talented individuals who deserve a chance to really shine within a company.
Interesting, I should be in Boston next month to visit a client.
Are we done now? Is this silly banter over with? God, you two (randall and Carpe) both sound like a married couple, not that there's anything wrong with that, but for Pete's sake (or even Frank's sake for that matter) kiss and make up... or tell eachother to fuck off and never reply a post to each other ever again.
Well, certainly I could sit here all day and ridicule people too. But why?
I tease Phat once in a while just for the hell of it, but if i knew anything I said really hurt his feelings I would stop in an instant. This is your chance Phat, if you've gotten THIS far into my post.
There is a big difference between ridicule and teasing.
I try to help and educate people whenever possible, and in the process I LEARN a hell of alot. I don't pretend to know everything, because I don't know jack-diddly-shit. I happen to know a little bit about the Quake engines, which pretty much coincides with anything in this Forum.
So according to Carpe, I have a huge EGO and try to act smarter than anyone else and everything I have said is pure stupidity with no basis in truth. (did I get it all?)
Let's tell the truth. I am smarter than Carpediem in some ways. Carpediem is smarter than me in some ways. But that is pretty much true for EVERY two people on this earth.
Even the dumbest hick from the west virginian foothills is smarter than Stephen Hawking when it comes to coon-huntin'.
Does that make Hawking stupid and worthy of ridicule? I certainly hope not.
I tease Phat once in a while just for the hell of it, but if i knew anything I said really hurt his feelings I would stop in an instant. This is your chance Phat, if you've gotten THIS far into my post.
There is a big difference between ridicule and teasing.
I try to help and educate people whenever possible, and in the process I LEARN a hell of alot. I don't pretend to know everything, because I don't know jack-diddly-shit. I happen to know a little bit about the Quake engines, which pretty much coincides with anything in this Forum.
So according to Carpe, I have a huge EGO and try to act smarter than anyone else and everything I have said is pure stupidity with no basis in truth. (did I get it all?)
Let's tell the truth. I am smarter than Carpediem in some ways. Carpediem is smarter than me in some ways. But that is pretty much true for EVERY two people on this earth.
Even the dumbest hick from the west virginian foothills is smarter than Stephen Hawking when it comes to coon-huntin'.
Does that make Hawking stupid and worthy of ridicule? I certainly hope not.
THE MIGHTY STEPHEN HAWKING IS A FUCKING QUAKE MASTER!!!
I know how to coon hunt. You cut a hole in a dead tree trunk on the ground about an inch and a half in diameter. Put a small shiny object, metal (like a spoon, washer, whatever) into the trunk. You then nail nails at a 70 degree angle inwards around the hole. The raccoon sticks his hand in to get the purty shiny thing and then can't get his hand out. He's too dumb to let go of it, he really likes shiny things. Then you come by and shoot it in the head the next morning.
If you'd like other bits of wisdom, please visit my website: www.moosemasterscoonhuntingtips.com
If you'd like other bits of wisdom, please visit my website: www.moosemasterscoonhuntingtips.com
LOL. So Moose is smarter than Hawking too! Yipppee! 
Also, black holes technically can't kill you. When inside the event horizon time would gradually speed up to infinity, which would mean time is nill. You wouldn't know you time was nill, because you are inside nill time (as I like to call it ;D). You would have no consciousness. It would be like your very own eternity, but not the good one. You'd have no sense of pain, pleasure, anything. But this is all assuming that you can withstand the stretching that occures when the first half of your body enters the event horizon and the second half hasn't yet. Sounds to me like it would hurt, but after that it's pure vegetation for eternity.
When passing thru an Event Horizon, I find it's best to curl up into a little ball, aka the fetal position.
It helps keep body stretching to a minimum, and gives you a chance to kiss your ass goodbye in the event something goes horribly wrong.
It helps keep body stretching to a minimum, and gives you a chance to kiss your ass goodbye in the event something goes horribly wrong.
Theory is so cool. Consider this:
Our world exists in a single dimension of time, a single point in infinity.
Imagine if TIME were a single pixel on our screen, and we were limited to viewing a maximum of ONE pixel. We could select alternative pixels to view, but we can't go back and look at a pixel again once it has been viewed. Until we have viewed the pixel, we do not know it's color. Only by memorizing (or mapping) the placement and color of previous pixels would we get a general idea of what the overall image on the screen is.
The FUTURE is the pixels we haven't seen yet.
The PRESENT is the currently viewed pixel.
The PAST is pixels we have viewed and memorized (or mapped). This is similar to recording history.
Now imagine if TIME had TWO dimensions, allowing us to view ALL the pixels at once and in effect the entire screen (image). We can zoom in on any pixel or group of pixels, or just sit back and view the overall screen.
Now try THREE dimensions of TIME.
Our world exists in a single dimension of time, a single point in infinity.
Imagine if TIME were a single pixel on our screen, and we were limited to viewing a maximum of ONE pixel. We could select alternative pixels to view, but we can't go back and look at a pixel again once it has been viewed. Until we have viewed the pixel, we do not know it's color. Only by memorizing (or mapping) the placement and color of previous pixels would we get a general idea of what the overall image on the screen is.
The FUTURE is the pixels we haven't seen yet.
The PRESENT is the currently viewed pixel.
The PAST is pixels we have viewed and memorized (or mapped). This is similar to recording history.
Now imagine if TIME had TWO dimensions, allowing us to view ALL the pixels at once and in effect the entire screen (image). We can zoom in on any pixel or group of pixels, or just sit back and view the overall screen.
Now try THREE dimensions of TIME.
oooh, that's deep. How about if this entire galaxy (including our belief in the sense/tenses of time) was just one tiny molecule in another hosts body... 
Randy, whatever your smokin', please send some my way, my college years have long since past 
999, whatever are you talking about? 
College people don't do that sort of stuff!
It's a place for learning... something, I forget.
College people don't do that sort of stuff!
It's a place for learning... something, I forget.
LOL, you guys kick ass
We know. 
I thought this thread was about C++, not galaxies being one pixel or being in the fetal position when goes through a black hole. My theory of the universe is that it's one sided. Like the paper thing where you take a strip of paper, twist it only and tape the ends, so there's only 1 side, not 2. That's my theory, because that explains black holes. You go in the hole, and come out in a different place, not the other side, because there is no other side. Oh, and the galaxy being one pixel, a single pixel can only show one color, so that disproves that theory. You know (and this is real, I saw it in a video during science), if the Earth is sucked into a black hole, it would be shrunken to the size of the point of a needle, so the fetal position would be adequate. When do you think C+++ will be made?
I didn't say the galaxy was a single pixel. I didn't say time was a single pixel. I said IMAGINE, meaning it was an anology (a weak one) in order to explore the possibility of 3 dimensional TIME.
Looks like Moose, 999, and Jaybot understood. But they are "way out there" anyway.
Looks like Moose, 999, and Jaybot understood. But they are "way out there" anyway.
I understand because I've designed an equation that explains time travel in a realistic and quite possible way.
What you need is negative gravity or negative mass. Go into null space, where no objects are influencing the gravitational bends of reality. Since a positive force of gravity, such as around the Earth creating things to fall inward, causes an advancement in time, a negative graphity force would produce an inverse effect, going backwards in time. So, negative mass is what you need to achieve, which can be done with negativy gravity. Negativy gravity can be created using the law of physics, pre-Einstein era.
That is how Sectoid aliens can move their ships so erratically. They slow down time to a finite point around their ship, causing it to move relatively fast compared to our time. This gravity field has a certain side effect. People who were abducted were introduced to this field. It slowed time down so greatly that when they were reintroduced to the "normal" 9.8 gravity of earth they are jared through a time "warp," effectively erasing their memory of the events. This relative speed in relation to a negative force of gravity also causes a paradigm on time. Is the speed causing the negative gravity, or is the negative gravity causing the speed. My theories adequately prove these relationships.
On a side note, aliens are extremely dumb. All they have is technology which was easily produced on their low gravity planet. Don't be afraid to hit them, they run quickly.
What you need is negative gravity or negative mass. Go into null space, where no objects are influencing the gravitational bends of reality. Since a positive force of gravity, such as around the Earth creating things to fall inward, causes an advancement in time, a negative graphity force would produce an inverse effect, going backwards in time. So, negative mass is what you need to achieve, which can be done with negativy gravity. Negativy gravity can be created using the law of physics, pre-Einstein era.
That is how Sectoid aliens can move their ships so erratically. They slow down time to a finite point around their ship, causing it to move relatively fast compared to our time. This gravity field has a certain side effect. People who were abducted were introduced to this field. It slowed time down so greatly that when they were reintroduced to the "normal" 9.8 gravity of earth they are jared through a time "warp," effectively erasing their memory of the events. This relative speed in relation to a negative force of gravity also causes a paradigm on time. Is the speed causing the negative gravity, or is the negative gravity causing the speed. My theories adequately prove these relationships.
On a side note, aliens are extremely dumb. All they have is technology which was easily produced on their low gravity planet. Don't be afraid to hit them, they run quickly.
My Dad used to hire Aliens to do the yard work when I was a kid.
They do run fast, I loved watching them wake the dogs.
They do run fast, I loved watching them wake the dogs.
Oh ya...
Patent Pending
These theories are only hypothesis of James Sonne. I do not recommend or endorse the execution of these theories in real world tests. The results of said tests are in no way James Sonne or any of his relation's fault. Damages that have occured due the the execution of said tests is also the reader's (hereby "you" and any derivitives), or your kin's responsibility.
Patent Pending
These theories are only hypothesis of James Sonne. I do not recommend or endorse the execution of these theories in real world tests. The results of said tests are in no way James Sonne or any of his relation's fault. Damages that have occured due the the execution of said tests is also the reader's (hereby "you" and any derivitives), or your kin's responsibility.
Warren, I just got The Complete Idiot's Guide to C++ by UPS today and I have to say that anyone and their dog can read and understand this book (now just watch him have trouble with it
). Watch out for misspellings in the source code though. I found one where the author, Paul Snaith, left out a bracket for the main() function, but you know all that, right? It's a great book, chapter 6 already, and I got it just an hour ago. Easy stuff.
Frustrated just like you are? Are you still upset that you couldn't make that SNES emulator that you said you would? And you know that Visual Basic sucks, do you really want more Crossword and puzzle games for the PPC?
And what college did you go to? I understood the Math for 3d graphics/engines my sophomore year of highschool. I think after calculus, I started to lose sight of what math is actually necessary for 3d... College just made me dumber.
And what college did you go to? I understood the Math for 3d graphics/engines my sophomore year of highschool. I think after calculus, I started to lose sight of what math is actually necessary for 3d... College just made me dumber.
I was taking Calculus in high school too. I don't know why anything beyond that would be necessary for 3D.
But Calculus is normally a second year college class. So maybe that is what Carpe meant.
But Calculus is normally a second year college class. So maybe that is what Carpe meant.
There's nothing wrong with spaghetti code as long as it's only going to be used by yourself.
Oh man. I've written plenty of "spaghetti code" thinking I was the only one that was going to use it.
Well, I WAS the only one that used it, and 6-months later I couldn't make heads or tails of the whole thing.
So it got scrapped.
Another thing: USE COMMENTS FOR EVEN THE MOST INANE OPERATIONS. They don't cost anything.
Well, I WAS the only one that used it, and 6-months later I couldn't make heads or tails of the whole thing.
So it got scrapped.
Another thing: USE COMMENTS FOR EVEN THE MOST INANE OPERATIONS. They don't cost anything.
Wow, for the first time in my life i totally agree with randall!!!, you are 100% right.
1st) You can do some really kick ass things in visual basic, i started with it when i was 16 and i really loved it, i don't know why you guys hate it so much, its a great piece of software if you are planning on making a standard win32 api.
2) what the fuck is up with you JayBot?, i thought things with you were cool. I never even coded a single line of a Snes Emu, i just asked ONCE if someone wanted to team up with me for the task. In contrast with you guys i don't think i can do really asswhooping things by myself and with little knowledge of programming, teamwork is the key in every big project.
3) Im not fucking telling you these things just to fucking say something, Everything is based on my experience, Hell, looking at all the options of Visual C++ just made me shit myself only 3 months ago, and i already knew C!.
4) Have you ever fucking even seen a 3d engine dude?, How the fuck do you know what math is required for it???. Im not talking about Quake's engine, i never understood jack shit about it, but i've seen other's like jacco's engine that is featured in my gapi benchmark. Dream on you learned all that shit in highschool. I bet you don't even know what a matrix is.
But things are like this with teenagers, you guys just won't listen to advice, I know that because i was a teenager just like you. So go ahead and see for yourself. I wish you the best of luck bud, really!
Last modification: CARPEDIEM - 04/03/01 at 04:06:47
1st) You can do some really kick ass things in visual basic, i started with it when i was 16 and i really loved it, i don't know why you guys hate it so much, its a great piece of software if you are planning on making a standard win32 api.
2) what the fuck is up with you JayBot?, i thought things with you were cool. I never even coded a single line of a Snes Emu, i just asked ONCE if someone wanted to team up with me for the task. In contrast with you guys i don't think i can do really asswhooping things by myself and with little knowledge of programming, teamwork is the key in every big project.
3) Im not fucking telling you these things just to fucking say something, Everything is based on my experience, Hell, looking at all the options of Visual C++ just made me shit myself only 3 months ago, and i already knew C!.
4) Have you ever fucking even seen a 3d engine dude?, How the fuck do you know what math is required for it???. Im not talking about Quake's engine, i never understood jack shit about it, but i've seen other's like jacco's engine that is featured in my gapi benchmark. Dream on you learned all that shit in highschool. I bet you don't even know what a matrix is.
But things are like this with teenagers, you guys just won't listen to advice, I know that because i was a teenager just like you. So go ahead and see for yourself. I wish you the best of luck bud, really!
Last modification: CARPEDIEM - 04/03/01 at 04:06:47
Whoah! Dude, Carpediem, Calm down, dude. Things were cool, I was just kidding around, you know poking fun/joking? Like the whole overclocking balls thing, dude I backed you on that.. shit it was just a joke. and yeah i've seen some 3d engine code in my time, but shit, i never said i could program one, just enough to be able to understand where some of it's going, and everyone knows what the matrix is, it was a really kick ass movie with keanu reeves with cool special effects or maybe it was that 4x4 list of numbers used to keep track of transformations.. but i could be wrong.
And, I'm not a teenager I haven't been one for awhile now, and I kinda miss it and wish I could go back to being invincible.. but I know what you mean Carpe! Sorry, if I somehow insulted you.
Lol JayBot.
I know what you mean, I wish i could go back too and scratch my balls all day long and don't do shit!. I don't like studying all day man!
Ohh, those were the days.
I know what you mean, I wish i could go back too and scratch my balls all day long and don't do shit!. I don't like studying all day man!
Ohh, those were the days.
I'll be getting the 2 books (Complete Idiot's Guide and Sam's Teach it Yourself in 10 Minutes as a reference book) on Thursday or Friday. The CD that comes with The Complete Idiot's Guide to C++, does it have Microsoft (or any other brand) Visual C++, that works in Windows? I don't really know anything about C or C++, so I don't know much about brackets, but brackets are the thing I know best. You need one to start a function and one to end it. C++ For Dummies was much worse. On many reviews I've read on it, they say that the first program they teach you to write is missing a major command line. Oh, I've also read that Tricks of the Windows Game Programming Gurus only teaches 2D games, not 3D. I'll learn 3D game programming from experimenting with the Half-Life source code, and other Half-Life and Quake 3 stuff. And I'll get online tutorials. Do you know of any good online 3D game programming tutorials? Thanks.
this makes me want to laugh. "I'm gonna read these 2 books and be ready to make Freakin halflife 2" u people have no understanding of how complicated it is. Even if you learned the basics you'd need to make every single sprite. Then figure oout how to use those. I'm sorry guys but it takes months to learn C++ not 2 'idiots guides to C++' because those books won't teach you shit. Iff you actually wanna learn you've gotta start making your own stuff read somethin then make a full prograam that exploits every single thing you can do with that ffunction or command.
sidenote: half-lifes source is not released, so you can't 'experiment' with it, unless you have a connection we don't know about
First of all Chuck, the source for Half-Life IS avalible (at least the SDK is). And second, I'm not planning on making Half-Life 2 or anything like that (plus, Half-Life 2 is already being made). I want to make "mods" for it. That does not require completely writing the software. I'm not planning on writing the "Quake 4" engine. Chuck, take your laughter somewhere else, and don't be "all high and mighty" about your C++ knowledge and make fun of people instead of helping them. I didn't start this thread to be made fun of. I started it to get information and help. I don't laugh at people when they tell me they're going to make a Counter-Strike map and want to know how to get started in mapping, I help them and tell them what they need, where to get it, and tricks I've learned. Perhaps you should do the same, Chuck.
Warren, The Complete Idiot's Guide comes with a C++ code analyzer. I haven't tried it, but I think it just tells you if the compiler will be able to read your code. It doesn't come with a compiler, linker, or builder.
And about skipping the Windows Game Programming book because it's 2D? Doom is 2D, technically so is Quake (atleast the output is). But my point is. It tells you all the DirectX commands, Complete game source code, how to design games, everything you need to know. You can't just say "I'll skip it because I want to do something more advanced." You need to learn the beginner stuff first. Trust me, I've tried several times to just skip it, and look where I'm back to, the Idiot's Guide. Trust me, don't skip anything, It will only hurt you in the long run.
Chuck- no, NM It's not worth me typing.
And about skipping the Windows Game Programming book because it's 2D? Doom is 2D, technically so is Quake (atleast the output is). But my point is. It tells you all the DirectX commands, Complete game source code, how to design games, everything you need to know. You can't just say "I'll skip it because I want to do something more advanced." You need to learn the beginner stuff first. Trust me, I've tried several times to just skip it, and look where I'm back to, the Idiot's Guide. Trust me, don't skip anything, It will only hurt you in the long run.
Chuck- no, NM It's not worth me typing.
Here are the MAIN things I learned through VB:
(reusable) Functions
Classes
API
Among other things, I just can't seem to remember anything else at this point.
Those are all implemented in C++, just in a different manner (no BASIC is NOTHING like C++, not even close). They are key components in most every game that I can think of.
In VB these are much easier to learn, and it's more of a disciplinary exercise than anything else. It teaches you structure and organization.
Yeah, VB sucks ass. As far as I'm concerned it's only good for quick-fixes, non-cpu intensive operations and frontends. But that was it's main market anyway.
It may seem the long way to game programming, but what it teaches up-front will be more valuable once you get to C++. Your code will be cleaner and more organized, and thus MAINTAINABLE (can you say "spaghetti code"?)
I would stick to the advice of Carpe; he isn't the first person I have heard to advise this.
Although, if you still feel you can jump right into C++, then go for it. Many people can do this and are very successful. But they are not the norm.
Last modification: randall - 04/03/01 at 12:20:00
(reusable) Functions
Classes
API
Among other things, I just can't seem to remember anything else at this point.
Those are all implemented in C++, just in a different manner (no BASIC is NOTHING like C++, not even close). They are key components in most every game that I can think of.
In VB these are much easier to learn, and it's more of a disciplinary exercise than anything else. It teaches you structure and organization.
Yeah, VB sucks ass. As far as I'm concerned it's only good for quick-fixes, non-cpu intensive operations and frontends. But that was it's main market anyway.
It may seem the long way to game programming, but what it teaches up-front will be more valuable once you get to C++. Your code will be cleaner and more organized, and thus MAINTAINABLE (can you say "spaghetti code"?)
I would stick to the advice of Carpe; he isn't the first person I have heard to advise this.
Although, if you still feel you can jump right into C++, then go for it. Many people can do this and are very successful. But they are not the norm.
Last modification: randall - 04/03/01 at 12:20:00
Good luck boys, You are going to need it.
Btw, you must at least be in 2nd year of college to understand the math involved in 3D graphics.
Guys, why don't you listen to me and start with visual basic?
I swear that you will all just end up frustrated.
Btw, you must at least be in 2nd year of college to understand the math involved in 3D graphics.
Guys, why don't you listen to me and start with visual basic?
I swear that you will all just end up frustrated.
I just finished reading all these posts, and I just have to say...
My hovercraft is full of eels.
My hovercraft is full of eels.
I'm ready to start the first book. BUT, I don't have any software. What software do you use and where did you get it? I probably should get Microsoft Visual C++ 6.0 used. New, it's $250! And with all the upgrades, it can go up to $2,100.00! I'm not about to pay anything near that, or even anything at all. Thanks.
okay penisbreath SDK (software Dev Kit) does not give you the full code it only gives you the functions and calls and whatnot to get the job done. Second, i never said you were gonna write quake 4. Third, i don't know much about C++, i've been learnin it for a few months and i'm letting you know now, in 3 months u probably won't be writing any 2d games. If your lucky you'll make a drug wars clone. Yes if i were you i'd start out on VB or maybe Delphi or Pascal they are all easy ass languages, but they teach you the basics of coding. Hell why don't you go pick up a nice TI calc and prog for that for a while. That'll teach you basic. If you wanna learn some basics of C++ learn HTML alot of the Bracketing is the same. And to whoever said VB sux can die. hehehe that Languaage ownz for none gaming, its the perfect language for anything that wants to share information with other programs thats why makin progs for aim and crap like that is so easy. It takes good advantage of winAPI, it is also a very very good starting block because of its easiness. You could actually make a weak 2d game on that in two months, shit i made a stupid skateboarding game on that in like a month and a half.
Yeah, I said VB sucks ass. Like I said, it's good for frontends, or non-cpu intensive operations, or quick apps.
Pretty much anything you write for AIM will fit into any of those categories. Matter of fact, that is where I learned to use the API; to control other programs.
Writing simple games is certainly possible with VB and is actually a good place to start.
Pretty much anything you write for AIM will fit into any of those categories. Matter of fact, that is where I learned to use the API; to control other programs.
Writing simple games is certainly possible with VB and is actually a good place to start.
Warren: I told you, that Windows Game Programming guide that I showed you has Microsoft Visual C++ 6.0 on the CD for free. And the book does cover 3D.
Chuck: Ohh no, you called me a "penis breath." How old are you, 12? By the way, I know HTML, Perl, QBASIC, ASP, and PHP, along with a little VB (which is worthless) and I knew enough C++ to follow a program through. Starting with VisualBasic before you move to C++ is total BS. Why take a side road like that? Visual Basic's easiness is exactly the problem, and it detours you from the actual programming. All you do is draw a little window and then tell it what to do. Boy, really educational. I'm glad I did that before C++~. It really helped me understand programming~.
Visual Basic would be good for anything that is a small purely windows based application, like an internet search utility, or MAME front-end. But why bother with it for any game that would require any horsepower at all (meaning other than a puzzle game). Pong doesn't even refresh fast enough using visual basic. It's not that great an app if you want to do anything real in the business. Warren wants to be able to change around the stuff in the HL SDK to make a mod. Why would VisualBasic help him there? It would take him another 3 months to learn it and then unlearn it again to start on C++. Worthless, totally worthless.
Chuck: Ohh no, you called me a "penis breath." How old are you, 12? By the way, I know HTML, Perl, QBASIC, ASP, and PHP, along with a little VB (which is worthless) and I knew enough C++ to follow a program through. Starting with VisualBasic before you move to C++ is total BS. Why take a side road like that? Visual Basic's easiness is exactly the problem, and it detours you from the actual programming. All you do is draw a little window and then tell it what to do. Boy, really educational. I'm glad I did that before C++~. It really helped me understand programming~.
Visual Basic would be good for anything that is a small purely windows based application, like an internet search utility, or MAME front-end. But why bother with it for any game that would require any horsepower at all (meaning other than a puzzle game). Pong doesn't even refresh fast enough using visual basic. It's not that great an app if you want to do anything real in the business. Warren wants to be able to change around the stuff in the HL SDK to make a mod. Why would VisualBasic help him there? It would take him another 3 months to learn it and then unlearn it again to start on C++. Worthless, totally worthless.
Warren, I don't know about the rest of the US, but in New York and Seattle I there are used computer book stores. They often sell new/used software as well.
I have seen VC++ 6.0 Enterprise Edition for $49.
Both cities also have half-price NEW computer book stores as well. Their stock is usually fairly current with latest versions of software.
So you can get a $49 book for around $25, sometimes cheaper.
I have seen VC++ 6.0 Enterprise Edition for $49.
Both cities also have half-price NEW computer book stores as well. Their stock is usually fairly current with latest versions of software.
So you can get a $49 book for around $25, sometimes cheaper.
moose, i wasn't talkin to u haha, i was talkin to warren, and second , i'm 17
o ya, if you'd actually use vb for more than a day to learn the basics, BitBlt is fast enough to make games, Mechwarrior was made in vb.
yeah, you have to learn effective use of the Windows API in order to get any performance out of VB. It is more than fast enough to make pong.
Chuck, I recommend leaving this forum. You only have 28 posts, and everyone already hates you. You're even calling me childish names now! Moose Master, I've been trying to get Trick of the Windows Game Programming Gurus, but my parents keep saying "we just bought you 2 books, we'll get you the third when you're done with these 2." I try to explain to them that it has MSVC++ on it, but they keep saying the book's too expensive. Don't worry, I'll get it sometime. As for now, I just want a simple compiler. Are there any free compilers up for download? Randall, do you live in the US? Thanks.
At this very second, I am downloading Borland C++ Compiler 5.5. Time to make my first program! I'm too excited!!!
Go warren! :)
Go me!
LOSERS!!!!!!!!!!!!! Ha
Well, the Borland Compiler didn't help. It doesn't have anything! It just has "examples" of the program. I look through the whole folder, and there's no main .exe file. Do I use Notepad for the code? Man, I really need Visual C++. It's says I have to make a bunch of .cfg files to make it work. I said "create something.cfg and include lines to redirect the main application to preform the presumed task." Umm :-/ And it said to make some .ini files. Don't I need a compiler, linker, and other stuff? Doesn't Visual C++ have all that in one program? Instead of having to use a bunch of programs? Jeez, I'm just gonna get Tricks of the Windows Game Programming Gurus, which comes with MSVC++. I was hoping to make my "Hello World!" program tonight.
Well, maybe next week, from now to Wednesday next week, I don't have any time. Oh well.
Yeah, I live in the US.
okay, your being stupid 'leave the board' don't be retarded, but anyway that compiler works its just crapy, you have to write the code as a text file, and then use the .exe to compile it, there is no gui its just a compiler a command line compiler thats what it says when you download it. IF you had read it better then you'd know cock.
First of all, I still use notepad to write my code, it just seems to be the easiest editor for me.
Second, Chucky seiously, chill out. Having a bad attitude on a message board, saying that everything and everyone sucks, is not a good idea, and is exactly the opposite of what the board is supposed to do. So cheer up, life's not that bad is it?
And please quit using your homophobic or assrapeaphobic 'insults', they're very disturbing and annoying on a public board and someone WILL be offended, if you want to continue to do that, I suggest you go here:
http://on.starblvd.net/meet/Society_and_Culture/Alternative_Life_Styles/prettyboy:GayYouth&sbt
Thanks.
Second, Chucky seiously, chill out. Having a bad attitude on a message board, saying that everything and everyone sucks, is not a good idea, and is exactly the opposite of what the board is supposed to do. So cheer up, life's not that bad is it?
And please quit using your homophobic or assrapeaphobic 'insults', they're very disturbing and annoying on a public board and someone WILL be offended, if you want to continue to do that, I suggest you go here:
http://on.starblvd.net/meet/Society_and_Culture/Alternative_Life_Styles/prettyboy:GayYouth&sbt
Thanks.
i'm not trying to be rude or 'childish' its just people start to bother me when they make statements regarding stuff they know nothing about. I never asked anybody for help when i started C++ i just went and downloaded a compiler and went at it, i just read some tutorials at planetsourcecode.com and went at it. If you actually want VC++ my sugestion is to download the warez verz. i'm not gonna tell you where to get it or anything, that would piss off the admin here, but if you look around enough you can find VS6 (visual studio 6) thats what i got. If you would actually like it i may be able to send it but you'd need a fast connection no 5k/s sends on a 600 meg ddl that'd be bad. go on irc on dalnet they have alot of stuf that would be useful
...
haha jaybot, its just a joke, i grew up on the mean streets of abbot3000's board, where if you ask a question you pretty much get your head ripped off, but they were good progers but yea i know i don't mean it, i just get bothered by people. I guess gettin laughed at when i asked wtf api was kinda rubbed me the wrong way
a'ite cool.
sweee, i don't feel bad anymore, okay time to sleep, Stupid school 6:00 in the mornin dang itt
Wow, I don't think I've ever heard such strong language over C++.
I guess I'll ease into the fray. First off, let me clarify something. A programming language, such as C, C++, Pascal, etc., is a very generic thing. It's useful only for allocating and manipulating chunks of numbers using very rudimentary math, while applying branches to do different things for different conditions. Period. To do anything useful you have to interact with the real world. Old school technique is direct access to the hardware, which these days is a no-no for many different reasons. Enter Micro$oft and the Windows API. 80% of my programming effort and frustration comes in trying to get Windows (CE, 2000, ME, etc) to do what I want it to do. The Windows API (which can also be abstracted using the Microsoft Foundation Classes in C++) is it's own world, and has nothing directly to do with a particular programming language. If you want to code for Macintosh, Palm Pilot, X-Windows (Linux/Unix), etc., then you enter an entirely different world with each. Visual C++ is designed to help write C/C++ software that interacts with the Microsoft Windows API, particularly with the MFC. What languages like Visual Basic do is provide a very high level of abstraction and data / object encapsulation to make it easier to interact with Windows. This is at a huge cost to overhead (compared to C++). For those that go to the trouble to directly make Windows API calls from within VB, I would say you would be far, far better off to learn C++ syntax so you can lose all the VB overhead you keep just to stick with what you already know. Starting off with Visual C++ with MFC is a good way to begin, as it provides a great deal of templates and automatic class member creation to handle various messages related to windows and other controls. This provides some similarity to VB (ie myWindow.Move(x,y,w,h) type syntax). Basically, all structured programming languages (C, C++, Pascal, VB, Java, etc) have very similar capabilities and logic flow. Thus adapting from one to another is primarily a matter of syntax, as opposed to having to go about solving a problem or thinking in a totally different way (like with Lisp/Scheme).
I have a comment about 3d, 2d, whatever programming. First off, if I were to write a 3d game, would I sit down with a blank sheet of paper, and discover for myself the various key algorithms used for transforming, rotating, etc. matrixes? No. No more then I would reinvent the Pythagorean theorem to find the ratio of the sides of a right triangle. All a programmer needs is the algorithm, which they can then attempt to code in an optimum way for the type of data it will use. When I was a student at YSU, I traveled around the US and Canada in various programming contests. I was the coder in a team of three, in which the other two members were mathematicians with little programming ability. While I would generate my own solutions to problems which were within my realm, I would also code algorithms produced by the mathematicians which I did not understand fully how it accomplished what it did (I would always know what it accomplished, but not necessarily the theory behind how it did it). This principle can be applied to game making. If you know that a particular algorithm, given a matrix, will rotate that point around another matrix, well, there you go. You don't need to know the actual geometrical theory to make full use of that function in your application. Further, these days you can find many such algorithms already coded in a variety of languages. I have never (unless it was an accident) utilized anything I learned in Calculus in programming. In fact, the math I deal with primarily in programming (especially the conversion of Quake's floating point math to fixed point) is binary and hexadecimal math, which is probably only touched on in advanced math courses such as number theory.
Back to C/C++. I guess the single most important piece of advice I can give a newbie programmer for that language is to always think of variables (structures, arrays, even simple types) as raw chunks of data. If you keep in mind that a variable is block of bytes, it will help you visualize what pointers are, and how pointers can be directly manipulated. Other languages, such as Pascal, VB, and Java, abstract and type cast the data higher than C/C++, so you need not understand what the data really is. C is so flexible it will let you get by with many bad things, so it is important to fully understand at a low level what is going on.
So, that was my quick blurb on the topic.
Moose, Phat: if stars were assigned by words as opposed to posts, I would have more than you!
Dan East
I have a comment about 3d, 2d, whatever programming. First off, if I were to write a 3d game, would I sit down with a blank sheet of paper, and discover for myself the various key algorithms used for transforming, rotating, etc. matrixes? No. No more then I would reinvent the Pythagorean theorem to find the ratio of the sides of a right triangle. All a programmer needs is the algorithm, which they can then attempt to code in an optimum way for the type of data it will use. When I was a student at YSU, I traveled around the US and Canada in various programming contests. I was the coder in a team of three, in which the other two members were mathematicians with little programming ability. While I would generate my own solutions to problems which were within my realm, I would also code algorithms produced by the mathematicians which I did not understand fully how it accomplished what it did (I would always know what it accomplished, but not necessarily the theory behind how it did it). This principle can be applied to game making. If you know that a particular algorithm, given a matrix, will rotate that point around another matrix, well, there you go. You don't need to know the actual geometrical theory to make full use of that function in your application. Further, these days you can find many such algorithms already coded in a variety of languages. I have never (unless it was an accident) utilized anything I learned in Calculus in programming. In fact, the math I deal with primarily in programming (especially the conversion of Quake's floating point math to fixed point) is binary and hexadecimal math, which is probably only touched on in advanced math courses such as number theory.
Back to C/C++. I guess the single most important piece of advice I can give a newbie programmer for that language is to always think of variables (structures, arrays, even simple types) as raw chunks of data. If you keep in mind that a variable is block of bytes, it will help you visualize what pointers are, and how pointers can be directly manipulated. Other languages, such as Pascal, VB, and Java, abstract and type cast the data higher than C/C++, so you need not understand what the data really is. C is so flexible it will let you get by with many bad things, so it is important to fully understand at a low level what is going on.
So, that was my quick blurb on the topic.
Moose, Phat: if stars were assigned by words as opposed to posts, I would have more than you!
Dan East
Whew, I can't believe I made it all the way through that and understood it.
Okay, I guess it's not that astounding considering it was a very simple and thorough analysis.
Okay, I guess it's not that astounding considering it was a very simple and thorough analysis.
congradulations i think you've settled the topic for now, so much tech. talk in that post it'll take months for everyone to think straight again. 
Taco.
gordita
Warren:
I deleted your post.
Please refrain from making any "Warez" requests on our boards.
Thanks in advance,
Admin
I deleted your post.
Please refrain from making any "Warez" requests on our boards.
Thanks in advance,
Admin
Sorry 'bout that.
Thanks for implying I'm dumb Dan
, JK.
Ugh, I feel like I need to defend myself and re-affirm that I know stuff. But all of you know that already so I won't bother.
Ugh, I feel like I need to defend myself and re-affirm that I know stuff. But all of you know that already so I won't bother.
Hey Moose Master, you just got 600 posts!
speech, speech, speech
Chuck, check your Hotmail account.
ummmmmkay?!!
that requires me to open a full new browser
, hey did anybody notice AIM is not responding ?!
I deleted your post.
Please refrain from making any "Warez" requests on our boards.
Hey can you delete users too?
Where'd Phat go?Last modification: Jaybot - 04/05/01 at 00:52:05
NOOOOOOo hhaha
can you delete my double posts?
*Poof*
Done
Last modification: 999 - 04/05/01 at 01:39:30
*Poof*
Done
Last modification: 999 - 04/05/01 at 01:39:30
I'd just like to thank Dan East, Frank M., Davalores Javier, and Matt and Chris. I'd also like to thank all the little peop- (steps forward) *crunch* uhm... Well, Thanks and later *zoom*
(HEY! Don't make fun of my zoom!
)
(HEY! Don't make fun of my zoom!
Ya, AIM isn't working. Some little newsie h4x0r is probably sending a DoS attack on the server. He's probably going to hear a knock on his door and "FBI! FREEZE!" in a couple minutes. Atleast he would if I were working for AOL. Little bitches
Uhh, Moose, you okay? What the hell are you talking about?
hahah, ya he's like man i'm gonna just gonna ping them until they crash w000t
Uhh, Moose, you okay? What the hell are you talking about?
Don´t worry about him, He ate that green thing...
Diego Cueva
I doubt he even tried to route his ping through another server.
But back to the thread for a short moment. Why does everyone like arrays in C++ so much. I could personally do without them. Why write a set of vars just to use a for() routine to look through them.
But back to the thread for a short moment. Why does everyone like arrays in C++ so much. I could personally do without them. Why write a set of vars just to use a for() routine to look through them.
cause for() may be alittle slower. i've never really compared the two
Using arrays are an easy way to manipulate like- data.
Imagine you have 10 phone numbers, and store each one in a seperate variable. you could use the names v_phone01, v_phone_02, v_phone_03, etc. But each time you wanted to add a new phone number, you would need a new variable. Everytime the program needed data, you would have to hardcode each variable:
cout << v_phone_01;
cout << v_phone_02;
cout << v_phone_03;
...
...
cout << v_phone_10;
Or, simply put it into an array: v_phone(x). It is much easier to search/add/remove/edit data in an array.
for (x=0; x<11; x++)
{
cout << v_phone(x) << "\n";
}
This is much more noticeable with large amounts of data. Imagine 100, 1000, 10000 phone numbers
I am sure there are a million typos in the code above, so I don't want to hear about how I forgot this-an-that. Hopefully I got the point across.
Last modification: randall - 04/05/01 at 05:43:47
Imagine you have 10 phone numbers, and store each one in a seperate variable. you could use the names v_phone01, v_phone_02, v_phone_03, etc. But each time you wanted to add a new phone number, you would need a new variable. Everytime the program needed data, you would have to hardcode each variable:
cout << v_phone_01;
cout << v_phone_02;
cout << v_phone_03;
...
...
cout << v_phone_10;
Or, simply put it into an array: v_phone(x). It is much easier to search/add/remove/edit data in an array.
for (x=0; x<11; x++)
{
cout << v_phone(x) << "\n";
}
This is much more noticeable with large amounts of data. Imagine 100, 1000, 10000 phone numbers
I am sure there are a million typos in the code above, so I don't want to hear about how I forgot this-an-that. Hopefully I got the point across.
Last modification: randall - 04/05/01 at 05:43:47
As randall stated, arrays are useful anytime you have a large number of elements to work with. They are really essential for most tasks (often their cousin, the Linked List, is used when the number of elements varies at runtime, or when chains of elements need to be moved around at once). In most cases the index itself is of some value. For example, PQ has a palette of 256 colors. This is represented by an array of 256 colors (I'll just use an int to represent a color value here):
int palette[256];
Now, PQ's bitmap is just an array of those color values (indices to the palette array):
int screen_buffer[320*240];
Note that the size of the array is simply the number of pixels needed by that particular resolution.
So, now say we want to find the actual color value at coordinate x, y:
int palette_value=screen_buffer[x*y];
int color_value=palette[palette_value];
Or we could just compound those statements:
int color_value=palette[screen_buffer[x*y]];
Obviously this type of work requires arrays.
Further, anytime you want to handle memory dynamically you are basically required to use arrays. For example, lets say at runtime I want 10,000 bytes of storage allocated (this is allocated off of the Heap, which is different than hardcoded variables, which are allocated off of the Stack).
char *my_data_chunk=malloc(10000);
A char is a signed byte.
So, to use my data, I treat the char pointer as an array (arrays and pointers are basically synonymous as far as usage goes). So lets initialize the chunk to 0 (yeah, I know we could use memset, but this is for illustration).
for (int i=0; i<10000; i++) my_data_chunk[ i ]=0;
How about a more efficient alternative to do the same thing using pointers:
char *ptr=my_data_chunk;
//We precalculate the pointer to the 10000th element
int *end=ptr+10000;
while (ptr<end) *(ptr++)=0;
I can break that down for you further if you want to know exactly what's happening.
Even more efficient, because this ansi C function is coded in assembly for the various target devices:
memset(my_data_chunk, 0, 10000);
How about something tricky, where we can really achieve some optimization? A byte is only 8 bits, yet modern processors at at least 32 bit. Thus we are only using a fourth of the processors data size by setting each byte, or 8 bits, at a time. Instead let's work with 32 bits (an int) at a time. Note that this requires our array size to be a multiple of 4 since we are handling 4 bytes at a time:
int *ptr=(int *)my_data_chunk;
//precalculate ending pointer
int *end=(int *)(my_data_chunk+10000);
while (ptr<end) *(ptr++)=0;
Now, that looks very similar to one of the previous examples. However, it requires 1/4th the amount of work on a 32 bit processor. If that code is compiled for a 64 bit processor then it will require 1/8th the work.
Again, I'll go into as much detail as you care to hear regarding how that works. Just let me know...
Dan East
Last modification: Dan East - 04/05/01 at 09:22:17
int palette[256];
Now, PQ's bitmap is just an array of those color values (indices to the palette array):
int screen_buffer[320*240];
Note that the size of the array is simply the number of pixels needed by that particular resolution.
So, now say we want to find the actual color value at coordinate x, y:
int palette_value=screen_buffer[x*y];
int color_value=palette[palette_value];
Or we could just compound those statements:
int color_value=palette[screen_buffer[x*y]];
Obviously this type of work requires arrays.
Further, anytime you want to handle memory dynamically you are basically required to use arrays. For example, lets say at runtime I want 10,000 bytes of storage allocated (this is allocated off of the Heap, which is different than hardcoded variables, which are allocated off of the Stack).
char *my_data_chunk=malloc(10000);
A char is a signed byte.
So, to use my data, I treat the char pointer as an array (arrays and pointers are basically synonymous as far as usage goes). So lets initialize the chunk to 0 (yeah, I know we could use memset, but this is for illustration).
for (int i=0; i<10000; i++) my_data_chunk[ i ]=0;
How about a more efficient alternative to do the same thing using pointers:
char *ptr=my_data_chunk;
//We precalculate the pointer to the 10000th element
int *end=ptr+10000;
while (ptr<end) *(ptr++)=0;
I can break that down for you further if you want to know exactly what's happening.
Even more efficient, because this ansi C function is coded in assembly for the various target devices:
memset(my_data_chunk, 0, 10000);
How about something tricky, where we can really achieve some optimization? A byte is only 8 bits, yet modern processors at at least 32 bit. Thus we are only using a fourth of the processors data size by setting each byte, or 8 bits, at a time. Instead let's work with 32 bits (an int) at a time. Note that this requires our array size to be a multiple of 4 since we are handling 4 bytes at a time:
int *ptr=(int *)my_data_chunk;
//precalculate ending pointer
int *end=(int *)(my_data_chunk+10000);
while (ptr<end) *(ptr++)=0;
Now, that looks very similar to one of the previous examples. However, it requires 1/4th the amount of work on a 32 bit processor. If that code is compiled for a 64 bit processor then it will require 1/8th the work.
Again, I'll go into as much detail as you care to hear regarding how that works. Just let me know...
Dan East
Last modification: Dan East - 04/05/01 at 09:22:17
Okay, my version was "Arrays for Idiots" and Dan's was "The Complete Reference for Dynamic Data Allocation". 
As you can see, arrays are VERY important when dealing with homogenous data (similar information). For normal variable use, it doesn't make sense to use an array, especially if the types are different like this:
unsigned short int v_age = 45;
char v_fullname[] = "Jed Clampett";
char v_occupation[] = "hillbilly";
char v_financial[] = "millionaire";
Instead of using arrays for unlike-data, these could be implemented into a class. This is especially effective if we were organizing data for multiple people.
class person
{
unsigned short int v_age;
char v_fullname[];
char v_occupation[];
char v_financial[];
f_bio();
}
Then different data could be stored for multiple people by defining a new "person".
person Jed;
Jed.v_age = 45;
Jed.v_fullname = "Jed Clampett";
Jed.v_occupation = "hillbilly";
Jed.v_financial = "millionaire";
person Jethro;
Jethro.v_age = 23;
Jethro.v_fullname = "Jethro Bodine";
Jethro.v_occupation = "student/moron";
Jethro.v_financial = "dependent of Jed Clampett";
person Granny;
Granny.v_age = 42;
Granny.v_fullname = "Granny Moses";
Granny.v_occupation = "homemaker";
Granny.v_financial = "dependent of Jed Clampett";
Alot of games use classes in order to store and organize the player/enemy stats like HEALTH, FIREPOWER, POSITION, etc.
I'm sure Dan can shed even more light on the usage of classes.
Last modification: randall - 04/06/01 at 06:08:19
As you can see, arrays are VERY important when dealing with homogenous data (similar information). For normal variable use, it doesn't make sense to use an array, especially if the types are different like this:
unsigned short int v_age = 45;
char v_fullname[] = "Jed Clampett";
char v_occupation[] = "hillbilly";
char v_financial[] = "millionaire";
Instead of using arrays for unlike-data, these could be implemented into a class. This is especially effective if we were organizing data for multiple people.
class person
{
unsigned short int v_age;
char v_fullname[];
char v_occupation[];
char v_financial[];
f_bio();
}
Then different data could be stored for multiple people by defining a new "person".
person Jed;
Jed.v_age = 45;
Jed.v_fullname = "Jed Clampett";
Jed.v_occupation = "hillbilly";
Jed.v_financial = "millionaire";
person Jethro;
Jethro.v_age = 23;
Jethro.v_fullname = "Jethro Bodine";
Jethro.v_occupation = "student/moron";
Jethro.v_financial = "dependent of Jed Clampett";
person Granny;
Granny.v_age = 42;
Granny.v_fullname = "Granny Moses";
Granny.v_occupation = "homemaker";
Granny.v_financial = "dependent of Jed Clampett";
Alot of games use classes in order to store and organize the player/enemy stats like HEALTH, FIREPOWER, POSITION, etc.
I'm sure Dan can shed even more light on the usage of classes.
Last modification: randall - 04/06/01 at 06:08:19
The Class is the primary thing that makes C++ different than C. A class is basically like a C struct, except that it also can contain functions which manipulate the data contained in the class. It also adds in additional capabilities, such as protecting the data / functions from access by other classes. Classes can also be derived from one another, which is a much more elegant method of reusing code. For example, you could have a base class in a DLL, and in an application build off of the functionality of the base class. MFC (Microsoft Foundation Classes) does a great deal of this. For example, the basic window class is CWnd. Controls, such as buttons, trees, lists, edit boxes, etc., are built off of the CWnd class. Thus when you want to move a button (MoveWindow), you aren't calling code in the CButton class, but the code that is in the CWnd class it is derived from. So if you are familiar with the (huge number of) CWnd member functions, then you can apply them to any object derived from that class. CodeGuru has a huge amount of source code specific to the MFC. C++ and MFC are extremely well suited for creating / expanding windows controls. If you go with MFC, then you are commiting your code for use in Microsoft Windows only. Period. There was at one time a version of MFC for Macintosh, but to my knowledge that product died a long time ago.
An advantage of using structs over classes is that the struct is just a chunk of memory, exactly large enough to store all the members it contains. Thus you can read directly in and out of a file into / out of a struct. This makes for extremely easy file IO. You can't do that with a class.
There is also additional runtime overhead to using C++ over C. Especially when using the CString class. I have come to avoid that class more and more, where I relied on it heavily in the past. You really have to watch, because often easy, quick coding comes at a cost to runtime performance. You only write code once (ideally), but it is executed literally millions of times (in loops, etc). It is worth extra coding effort so that the optimizations are where they belong, in the execution of the app, as opposed to optimized code writing. That is one of the reasons I am fundamentally against Visual Basic (etc). The running application will require the device to work much harder to perform a given task, just so the programmer didn't have to when they were writing the software. That may be fine for a 1 ghz Pentium III machine, but not for a Pocket PC.
Most games (Quake included) are written in C. My suggestion is to use MFC for more standard windows apps that do not take over the entire display (not using Game API). You should avoid MFC for games. Don't make the mistake of throwing in CString or similar MFC class because you don't feel like handling string manipulation yourself. This would come at a huge cost to portability (and performance), for the day you want to port your award-winning game to Playstation 2.
Don't ask me where this thread is going...
Dan East
An advantage of using structs over classes is that the struct is just a chunk of memory, exactly large enough to store all the members it contains. Thus you can read directly in and out of a file into / out of a struct. This makes for extremely easy file IO. You can't do that with a class.
There is also additional runtime overhead to using C++ over C. Especially when using the CString class. I have come to avoid that class more and more, where I relied on it heavily in the past. You really have to watch, because often easy, quick coding comes at a cost to runtime performance. You only write code once (ideally), but it is executed literally millions of times (in loops, etc). It is worth extra coding effort so that the optimizations are where they belong, in the execution of the app, as opposed to optimized code writing. That is one of the reasons I am fundamentally against Visual Basic (etc). The running application will require the device to work much harder to perform a given task, just so the programmer didn't have to when they were writing the software. That may be fine for a 1 ghz Pentium III machine, but not for a Pocket PC.
Most games (Quake included) are written in C. My suggestion is to use MFC for more standard windows apps that do not take over the entire display (not using Game API). You should avoid MFC for games. Don't make the mistake of throwing in CString or similar MFC class because you don't feel like handling string manipulation yourself. This would come at a huge cost to portability (and performance), for the day you want to port your award-winning game to Playstation 2.
Don't ask me where this thread is going...
Dan East
This thread is pretty much staying on the subject of C++.
I haven't even come across any books that compile so much information into such a relatively small space. So I rather enjoy the "free information".
Have you considered writing a book, Dan?
I haven't even come across any books that compile so much information into such a relatively small space. So I rather enjoy the "free information".
Have you considered writing a book, Dan?
Dan, randall. Thanks a lot, but I already bought a couple books on C++ ;D. But really, Dan's pallete and pixel examples were a perfect explanation.
I made this in eVB last week but its pretty rubbish using that so I wondered if anyone could help me make it in eVC? The PLAY button should load PocketQuake with command line parameters but as that doesnt seem to work at the moment it just pops up a message box.
Everything else is in place and it makes some great config files for you! (There are more frames than the one I've shown) I also need to know the list of options for the engine (my 'video settings' frame doesnt do much yet)
I kind of understand C but the whole thing with linking .c (or whatever) files to the forms is beyond me. If someone could point me in the right direction I could do this myself and release it by the end of the week...
http://www.btinternet.com/~pocketquake/quakeon.gif
Oh yeah, you can see the desktop QuakeOn at http://www.planetquake.com/quakeon/
Last modification: Paul - 04/12/01 at 03:08:47
Everything else is in place and it makes some great config files for you! (There are more frames than the one I've shown) I also need to know the list of options for the engine (my 'video settings' frame doesnt do much yet)
I kind of understand C but the whole thing with linking .c (or whatever) files to the forms is beyond me. If someone could point me in the right direction I could do this myself and release it by the end of the week...
http://www.btinternet.com/~pocketquake/quakeon.gif
Oh yeah, you can see the desktop QuakeOn at http://www.planetquake.com/quakeon/
Last modification: Paul - 04/12/01 at 03:08:47
Well, I don't know any way to get what you've done in eVB over to C++ without redoing everything in eVC. Visual C++ uses what are called Dialogs, which are pretty much equivalant to Froms in eVB. There is no way to copy a form into, or access a Visual Basic form, from eVC++. I think with Windows ME (etc), you could create a DLL with VB that you could then access from VC++, but you can't create DLLs or EXEs with eVB.
To get you started redoing it in eVC:
Create a new MFC Application in eVC.
Hit Ctrl-R, then double click on Dialog.
You now see something roughly like the forms editor in eVB. Layout all the controls as you normally would. You will have to assign a Control ID to each control, which should be in all capitals.
Double click on the title bar of the dialog you created, and a box will pop up. Pick a name for the CDialog C++ Class that will be created to handle this Dialog box (MFC convention is to start all class names with a capital C, ie: CQuakeOnDlg).
The Class Wizard will popup, which will allow you to add handlers for events, and variables for the controls. Click on the Member Variables tab, and double click each of the Control IDs representing the controls you added to the Dialog. Pick a variable name for each. C++ convention is to proceed each Class Member variable name with m_, so you can tell members of the class from local variables (ie: m_installed_patches).
That will at least get you started.
I don't know what your programming background is, or how familiar you are with eVC++, so it's kinda hard to offer advice.
Dan East
To get you started redoing it in eVC:
Create a new MFC Application in eVC.
Hit Ctrl-R, then double click on Dialog.
You now see something roughly like the forms editor in eVB. Layout all the controls as you normally would. You will have to assign a Control ID to each control, which should be in all capitals.
Double click on the title bar of the dialog you created, and a box will pop up. Pick a name for the CDialog C++ Class that will be created to handle this Dialog box (MFC convention is to start all class names with a capital C, ie: CQuakeOnDlg).
The Class Wizard will popup, which will allow you to add handlers for events, and variables for the controls. Click on the Member Variables tab, and double click each of the Control IDs representing the controls you added to the Dialog. Pick a variable name for each. C++ convention is to proceed each Class Member variable name with m_, so you can tell members of the class from local variables (ie: m_installed_patches).
That will at least get you started.
Dan East
Yeah I knew I had to use dialogs - I've already started a project with the 'WIN32 Pocket PC Application' icon, not the MFC... I'll try again
Dan, you're adding command line support, yeah?
I had a registry problem a few days ago and now everything is reset - I've reinstalled the whole Visual Studio and the Embedded Tools loads of times and I'm still getting 'control not registered' (or something like that) in VB and "Error spawning shcl.exe" when i build in eVC... what's that about?
Last modification: Paul - 04/12/01 at 03:45:33
Dan, you're adding command line support, yeah?
I had a registry problem a few days ago and now everything is reset - I've reinstalled the whole Visual Studio and the Embedded Tools loads of times and I'm still getting 'control not registered' (or something like that) in VB and "Error spawning shcl.exe" when i build in eVC... what's that about?
Last modification: Paul - 04/12/01 at 03:45:33
The reason I recommend MFC is because the eVC++ gui will allow you to add and remove variables and handlers all point-and-click. Also, the MFC dialog classes are similar to Visual Basic when it comes to accessing the data contained in the controls. The mfc dll is in the ROM of all Pocket PC devices, so that's not an issue.
As for your installation problems, have you tried uninstalling first? Make sure you scan your harddrive for errors before reinstalling too. I've never had any such problems in the 5 years I've been using the Windows CE toolkits.
Dan East
As for your installation problems, have you tried uninstalling first? Make sure you scan your harddrive for errors before reinstalling too. I've never had any such problems in the 5 years I've been using the Windows CE toolkits.
Dan East
this could be why the computer math class i'm taking at school doesn't seem to help. I need to learn MFC and they are teaching plain C++ crap thats usable in any compiler.
thanks for that tit bit of info i'm gonna work on this now. I figure i have enough of the basics to get a small program running.
where is a good place to find some help on MFC ???
http://www.pocketprojects.com/site/
and
http://msdn.microsoft.com/default.asp
and
http://www.devbuzz.com/
are a few...
and
http://msdn.microsoft.com/default.asp
and
http://www.devbuzz.com/
are a few...
So what you're saying is that you want to be me 
no i don't want to be gay
j/k
j/k
no i don't want to be gay
j/k
j/k
Ok, I've been learing C++ for a few days now, and this one thing is driving me insane. What is this "passing by value" thing?
Passing by value makes a temporary copy of the variable/parameter- allowing the original variable to remain unchangable by the called function.
Okay that was confusing. Let's try an anology.
By Value- Your friend asks what your girlfriend looks like, so you show him a picture. He can see what she looks like, but has no real interaction with her directly.
By Reference- Your friend asks what your girlfriend looks like, so you give him her street address and phone number so he can go see for himself. Now he has direct interaction with her.
Often you just need to "use" a variable, rather than modify it.Last modification: randall - 04/17/01 at 01:43:28
Okay that was confusing. Let's try an anology.
By Value- Your friend asks what your girlfriend looks like, so you show him a picture. He can see what she looks like, but has no real interaction with her directly.
By Reference- Your friend asks what your girlfriend looks like, so you give him her street address and phone number so he can go see for himself. Now he has direct interaction with her.
Often you just need to "use" a variable, rather than modify it.Last modification: randall - 04/17/01 at 01:43:28
Isn't passing by value when you run a function and send a parameter to it:
Like that as an example of a created function that passes 2 variables into it to add them together and display the total created by them.
- Code:
main(){
int x = 6;
int y = 7;
cout << Add(x,y);
return 0;
}
Add(int x, int y){
int total = x + y;
return total;
}
Like that as an example of a created function that passes 2 variables into it to add them together and display the total created by them.
No, because you can pass the variable a couple of ways- By Value and By Reference.
By Value makes a copy and sends it to the function- so the original is NOT able to be modified by the function.
By Reference uses a pointer to the original- allowing it to be modified by the function.
By Value makes a copy and sends it to the function- so the original is NOT able to be modified by the function.
By Reference uses a pointer to the original- allowing it to be modified by the function.
Christ... I'm not making a bit of sense today. Let's just wait for Dan to respond since he is so elegant with these types of explanations. 
I think I get it. It's using the value of the variable as a reference to another variable without changing the first variable. Ex-
int x = 3
int y = x * 3
y = 9
x = 3
Is that it?
Well, here's the example the book gave -
#include <iosteam.h>
void swap(int x, int y)
int main()
{
int x = 5, y = 10;
cout << " Main. Before swap, x: ";
cout << x << " y: " \n";
swap(x, y);
cout << " Main. After swap, x: " << x;
cout << " y: " << y << " \n";
return 0;
}
void swap(int x, int y)
{
int temp;
cout << " Swap. Before swap. x: ";
cout << x << " y: " << y << " \n";
temp = x;
x = y;
y = temp;
cout << " Swap. After swap, x: ";
cout << x << " y: " << y << " \n";
}
Output -
Main. Before swap. x: 5 y: 10
Swap. Before swap. x:5 y: 10
Swap. After swap. x: 10 y: 5
Main. After swap. x: 5 y: 10
int x = 3
int y = x * 3
y = 9
x = 3
Is that it?
Well, here's the example the book gave -
#include <iosteam.h>
void swap(int x, int y)
int main()
{
int x = 5, y = 10;
cout << " Main. Before swap, x: ";
cout << x << " y: " \n";
swap(x, y);
cout << " Main. After swap, x: " << x;
cout << " y: " << y << " \n";
return 0;
}
void swap(int x, int y)
{
int temp;
cout << " Swap. Before swap. x: ";
cout << x << " y: " << y << " \n";
temp = x;
x = y;
y = temp;
cout << " Swap. After swap, x: ";
cout << x << " y: " << y << " \n";
}
Output -
Main. Before swap. x: 5 y: 10
Swap. Before swap. x:5 y: 10
Swap. After swap. x: 10 y: 5
Main. After swap. x: 5 y: 10
Yes, that's an example. And my example is sufficient. Here's an example of passing by reference. A reference to a variable is a way of pointing (associated with pointers) to the memory address of a variable so that you don't need to return any variables from the function:
That should do it, although it's not a useful or more efficient way of doing what I want to be done.
- Code:
/* This will add one to the two variables, x and y, by passing them by reference to Add() */
main(){
int x = 6;
int y = 7;
cout << "Before Add()";
cout << y;
cout << x << endl;
Add(x,y);
cout << "After Add()";
cout << y;
cout << x << endl;
}
Add(int &x, int &y){
x++;
y++;
}
That should do it, although it's not a useful or more efficient way of doing what I want to be done.
Oops, Moose sneaked one in before me. This is in reference to Warrens post preceding Moose:
Yeah, that would be passing by value.
Notice how the original X/Y variables weren't changed by the function? This is because the function was only working with a copy. Kind of like scribbling on a photograph of the Mona Lisa- it has no effect on the original residing in the Louvre'.
Now if these were passed by reference, the originals would have been swapped.
Last modification: randall - 04/17/01 at 02:40:02
Yeah, that would be passing by value.
Notice how the original X/Y variables weren't changed by the function? This is because the function was only working with a copy. Kind of like scribbling on a photograph of the Mona Lisa- it has no effect on the original residing in the Louvre'.
Now if these were passed by reference, the originals would have been swapped.
Last modification: randall - 04/17/01 at 02:40:02
Warren wrote:
int x = 3
int y = x * 3
y = 9
x = 3
Is that it?
Nope. As the other guys have said, this involves calling a function. A basic way of describing it is if a function is written to accept a parameter by reference, then that function can modify that variable's value. When passing by value the function cannot modify that variable's value (outside the scope of the function). I don't know if this will help you or confuse you more, but another technique that achieves the same result as passing by reference is to pass a pointer to the variable. Since the function has the pointer to the variable it can modify the variable's value:
Sample passing a pointer to a variable
void add(int *result, int a, int b) {
//Result is a pointer to an integer variable
*result=a+b;
}
int main() {
int result;
//We send "add" a pointer to "result" variable.
add(&result, 10, 20);
//The add function modified result
//so it is now equal to 30
}
Sample passing by reference
void add(int &result, int a, int b) {
result=a+b;
}
int main() {
int result;
add(result, 10, 20);
//The add function modified result
//so it is now equal to 30
}
Notice that passing by reference is simply a more elegant and less confusing method of passing pointers to variables. Most functions do not modify the variables that were passed to them, hence they aren't written to accept variables by reference. Note also that when you call the function you do not have to do anything different to pass by reference or pass by value.
Dan East
int x = 3
int y = x * 3
y = 9
x = 3
Is that it?
Nope. As the other guys have said, this involves calling a function. A basic way of describing it is if a function is written to accept a parameter by reference, then that function can modify that variable's value. When passing by value the function cannot modify that variable's value (outside the scope of the function). I don't know if this will help you or confuse you more, but another technique that achieves the same result as passing by reference is to pass a pointer to the variable. Since the function has the pointer to the variable it can modify the variable's value:
Sample passing a pointer to a variable
void add(int *result, int a, int b) {
//Result is a pointer to an integer variable
*result=a+b;
}
int main() {
int result;
//We send "add" a pointer to "result" variable.
add(&result, 10, 20);
//The add function modified result
//so it is now equal to 30
}
Sample passing by reference
void add(int &result, int a, int b) {
result=a+b;
}
int main() {
int result;
add(result, 10, 20);
//The add function modified result
//so it is now equal to 30
}
Notice that passing by reference is simply a more elegant and less confusing method of passing pointers to variables. Most functions do not modify the variables that were passed to them, hence they aren't written to accept variables by reference. Note also that when you call the function you do not have to do anything different to pass by reference or pass by value.
Dan East
Thanks Dan, now I get it, it's pretty much a reference to variable(s) outside the function, without changing the value of the variable in the previous function. Or something like this, you know, I'll learn more about it as I progess.
just a quick question - whats a good book for learning ms visual c++?
There isn't any good book for learning MS Visual C++ IMHO because they all want you to use MFC. Bleh!
shut up newbie
then get Using Visual C++ 6 by Jon Bates and Tim Tompkins. I find it to be pretty good. Better for developing apps (MFC-style) then games. The last DirectX book i bought was DirectX Complete by Michael Root & James Boer which covers DX at the time of DX6 i think. Not that much has changed in the way of fxn's. So there's yer freakin answer then Paul-ie Shore.
Zesteh!
I'd just get the full Microsoft Training guide, go on a few courses and seminars. Hey, you can get your employer to fund you, (technically its training)
JongJungBu,
There have been drastic changes to the DirectX APIs since version 6 - especially in the graphics area. DX8 doesn't include DDraw anymore. D3D8 now supports a fully programmable vertex and pixel pipeline through its own shader programming language. Cubic textures, matrix blending, environment mapping, high-order surface support... need I go on? Read the docs from the latest DX8 SDK. It's a free download from Microsoft's web site.
I would avoid MFC on the Pocket PC if you can. It has its purpose but not on a handheld device. If you're trying to port existing MFC code or libaries to the PPC, or if you are really skilled in MFC and know your way around the source code then go ahead and use it. Otherwise you're better off using the Win32 API - especially for programming a game with realtime graphics.
There have been drastic changes to the DirectX APIs since version 6 - especially in the graphics area. DX8 doesn't include DDraw anymore. D3D8 now supports a fully programmable vertex and pixel pipeline through its own shader programming language. Cubic textures, matrix blending, environment mapping, high-order surface support... need I go on? Read the docs from the latest DX8 SDK. It's a free download from Microsoft's web site.
I would avoid MFC on the Pocket PC if you can. It has its purpose but not on a handheld device. If you're trying to port existing MFC code or libaries to the PPC, or if you are really skilled in MFC and know your way around the source code then go ahead and use it. Otherwise you're better off using the Win32 API - especially for programming a game with realtime graphics.
I see, Digby.
I have not been delving into DirectX or games development in Windows in while. So I was not aware of all the changes. Dang it. That changes everything...
As for the MFC vs. plain Win32 API, I whole-heartedly agree (as I mentioned previously about MFC better for apps than games). I really don't like to use MFC at all, but its nice to know it if yer gonna work for a company that wants to use it. As for gaming (or anything really) on the Pocket PC, I'm just stickin with the Win32 API and hope to figure out my anomalies with the GAPI when I want that speed. <Sigh>.
I have not been delving into DirectX or games development in Windows in while. So I was not aware of all the changes. Dang it. That changes everything...
As for the MFC vs. plain Win32 API, I whole-heartedly agree (as I mentioned previously about MFC better for apps than games). I really don't like to use MFC at all, but its nice to know it if yer gonna work for a company that wants to use it. As for gaming (or anything really) on the Pocket PC, I'm just stickin with the Win32 API and hope to figure out my anomalies with the GAPI when I want that speed. <Sigh>.
MFC absolutely has its place with gui-intensive apps, which is what I normally develop for. As has been said, I would avoid it for games. My "top secret"
app currently under development uses MFC.
Dan East
Dan East
Dan,
Speaking of MFC on the Pocket PC, does the Pocket PC version of the library support any of the thing specific to the platform (i.e. RichInk), or is it strictly a port from the PC implementation?
Speaking of MFC on the Pocket PC, does the Pocket PC version of the library support any of the thing specific to the platform (i.e. RichInk), or is it strictly a port from the PC implementation?
There isn't an MFC class for RichInk. MFC does provide access to some of the Pocket PC specific items, particularly through the CFrameWnd class for controlling the Command Bar (CCeCommandBar). MFC also provides classes for handling CE Databases. One of MFC's greatest advantages is in providing a framework for enhancing or creating new types of gui controls. That is where it makes things easier for me. Of course using C++ classes to organize your code, instead of having massive case statements and thousands of global functions, makes it much easier to maintain and understand your source.
Dan East
Dan East
Sorry if this has already been said in this thread, but I didn't have the self-discipline to read the whole thread: 
The best C++ book is "C++ Primer" by Lipmann/Lajoie.
Also, sometime in the future, when you've got some experience, get "Code Complete" by McConnell.
PDAFantast.
The best C++ book is "C++ Primer" by Lipmann/Lajoie.
Also, sometime in the future, when you've got some experience, get "Code Complete" by McConnell.
PDAFantast.
okokko, if you wanna program games, go to gamedev.net and check out their articles sources, you can find Thinking In C++ free their volumes 1 and 2, that book is great!!. My Favorite C book though it Teach yourself C In 24 hours by Tony Zhang, the book is the best, great refrence book also!!! Ohh yah, i habe the complete Idiots guide to C++, and it... SUCKSSSSSSS, its horrible its so much worse then TCIP and TYCI24, especially towards the end of the book were the author just plain sucks!!!
Jadam..
Your post:
Wed Apr 10, 2002 6:44 am
The post before yours:
Mon Jul 02, 2001 6:22 am
You win the "digging up an old thread" award for today. Congratulations.
Cheers,
Refractor
Your post:
Wed Apr 10, 2002 6:44 am
The post before yours:
Mon Jul 02, 2001 6:22 am
You win the "digging up an old thread" award for today. Congratulations.
Cheers,
Refractor
lol