Archived

This topic is now archived and is closed to further replies.

ironfroggy

VC++ 6.0 error

Recommended Posts

When I try to run VC, i get two dialogs: C:\Program Files\Microsoft Visual Studio\Common\MSDev98\MSDEV.EXE A device attached to the system is not functioning. and, Error Starting Program The DEVSHL.DLL file is linked to missing export MFC42DLL:6467 It''s a new computer and a nearly fresh install of VC, so if its wrecked such that I need to reinstall, that''s not a big problem. I would just like to know what the problem is. // God.c void main() { WORLD Earth; LIFE People = Earth.CreateLife(HUMAN); GiveHope(&People); delete Earth; EvilCackle(); }

Share this post


Link to post
Share on other sites
It looks like you are missing or have an older version of some DLL file (from the look of it MFC42.DLL). This is a complete guess but I have had similar problems before. A reinstall may fix it, but I''m not sure. Sorry that''s all I know.

Share this post


Link to post
Share on other sites
Cute variable names can lead to very nasty bugs. The purpose of variable names is to make the code more readable. Come up with a convention, use it, and make sure to comment whenever needbe.

- Kevin "BaShildy" King
Game Programmer: DigiPen
www.mpogd.com

Share this post


Link to post
Share on other sites
quote:
Original post by ironfroggy
//because WORLD is a macro expanding to *HabitablePlanet
#define WORLD *World

Which would change the ensuing code to:
*World Earth;
...

Which is still illegal syntax (you probably wanted World *, not *World). Even so, you''d still need to instantiate the pointer, or you''d have an access violation (attempting to access member data of a non-existent data structure).

Of course, it''s just a .sig. But if you''re gonna defend it, do it right:
// God.c
World *Earth = new HabitablePlanet(); // HabitablePlanet is a superclass of World
Life *People = Earth->CreateLife(HUMAN); // operator-> instead of operator. because Earth is a pointer
GiveHope(People); // already a pointer; no need for address-of
delete Earth;
EvilCackle();

It still leaves the question as to whether CreateLife returns a handle/pointer to member/dependent data of Earth (ie, can people survive without a world to live on)?

Sometimes it''s fun to be trivial.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
quote:
Original post by Kylotan
*shakes head, sighs, leaves for saner threads*


ROTFLMFAO
oh... god... some things you stumble in on whilst lurking...


---email--- Tok ----surf----
~The Feature Creep of the Family~

Share this post


Link to post
Share on other sites
ironfroggy-

i also got those 2 errors when i tried to run Visual C++.

to fix it, edit the shortcut to visual c++ on the start menu(right click it and select properties). click on the shortcut tab, and click on the find target button. change the "start in" directory to the directory the find target button takes you to.

this should fix the problem.

-Greg

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
unless you use the operator ''new'' to create your Earth var your going to get into alot of trouble

Share this post


Link to post
Share on other sites