Advertisement

Why wont it work?

Started by June 23, 2002 06:24 AM
17 comments, last by Morthvargr 22 years, 4 months ago
That code shouldn''t compile, Dactyl. Because there''s no "using namespace std;"
please...learn to program before you try to learn to program directX. You said that you suck *** at programming then I highly recommend that you learn to program before you go fooling around with DirectX.

and your first error is because you didnt link with the ddraw.lib and the second error is because of 2 reasons. First you created a Console application which cant be used for direct draw and second, in a console application you MUST have a main function and the compiler cant find it.


"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T
Advertisement
AP: It does,though!!

Those who do not love don''t live.
[My Lousy Page | Kings Of Chaos | Vampires | [email=lordlethis@hotmail.com]email.me[/email]]
AP is right. Dactylos'' code should not compile as it is. What compiler are you using? Aparently your
< iostream > 
is including
using namespace std; 
, which it should NOT be doing.

As far as the whole DirectX thing is concerned, I totally agree with felonius and ncsu121978. If you''re (by your own admission) not any good at programming, how the @#$%@$ do you expect to learn DirectX? I''m not trying to be rude here, just realistic.

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Well I''m a newbie too, but personally, I think you learn a lot more by figuring out things for yourself, and using the board as a last resort. I mean, anyone can initialize Direct Draw with minimum programming knowledge (copy and paste, anyone?), but not everyone can understand what they''re doing. To be a skilled programmer, it''s not just important to know HOW to do something, but WHY it works, IMHO.

So in response to the starter of this thread, lay off the DirectX for a bit and learn some basic C++. Trust me, from someone who was recently in your position, it will be better for you in the end. You''ll only get frustrated otherwise.
Peon
Well said, Peon! Well said!

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Advertisement
Thanks people for pointing out the mistake in my code. How embarrassing when I''m trying to give fool-proof code and everything . Anyway, I''ve updated the code so future newbies reading this post won''t be mislead. (btw, in case you''re interested, the compiler I tested it on was gcc 2.95.3).
pretty sure you cant use DirectX with gcc FYI
incase you are still wanting to do DirectX soon

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T
quote: Original post by ncsu121978
pretty sure you cant use DirectX with gcc FYI
incase you are still wanting to do DirectX soon

Yes you can. Just remember to compile with -fvtable-thunks to make the v-tables gcc generates compatible with COM.
Anyway, didn''t he say he was using MSVC++?

This topic is closed to new replies.

Advertisement