Trouble building a SIMPLE code in VC++.Net
Here is the VERY SIMPLE code base....
/* ''01 Main.cpp'' */
/* Input output stream header file */
#include <iostream>
/* Start */
main (void)
{
std::cout << "Hello all you happy people" << std::endl;
return 0;
}
and when I attempt to run it with Ctrl-F5 I get this message and it never builds...
Unable to start debugging.
Unable to start program "----file name-----"
The system cannot find the file specified.
Fatal error C1010: unexpected end of file while looking for precompiled header directive
-----
Huh? What the heck is THAT all about!?
Can anyone shed some light on this very murky subject?
Thanks!
Rob
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
Im not sure what you are doing wrong becasue that code looks really butchered to me
why not just try it like this and see if it works.
why not just try it like this and see if it works.
#include <iostream>using namespace std;int main(){cout << "Hello how are you people?\n";return 0;}
Same exact result...the problem is not the code, it''s something in the compiler options...but I have no clue what!?
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
You have your project set up to use a precompiled header (stdafx.h). Change the project options to not use one.
Don''t listen to me. I''ve had too much coffee.
Don''t listen to me. I''ve had too much coffee.
Ah! I thought so from the error messaging I was reading, but can''t figure out HOW to change the setting. I''ll keep looking, I''m bound to find it in the copious help texts for VC++.Net
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
Should be in Project Settings. I''ve not got VC.net installed at the moment, so I can''t tell you exactly how to get there. Try right-clicking on your project.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
HAH! I found it! What a PITA!...Well at least I know now.
Of course the code should produce that line...
Hello all you happy people
Then advance to the next line..
And then nothing after it...
But I keep getting the ''Press any key to continue'' message...any way to supress that? I forget..or is it normal and expected?
It''s been a LOOOOONG time since I did any C++ coding...LOOOONG time.
Rob
Of course the code should produce that line...
Hello all you happy people
Then advance to the next line..
And then nothing after it...
But I keep getting the ''Press any key to continue'' message...any way to supress that? I forget..or is it normal and expected?
It''s been a LOOOOONG time since I did any C++ coding...LOOOONG time.
Rob
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
BTW - My thanks to all that replied and helped me sort this out.
Rob
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Rob
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
The "press a key" message is normal and is produced by Visual C++ so you can see your program output before it disappears. Your program will not wait for a keypress if run outside Visual C++.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Thanks! I thought so, but like I said...it''s been a LOOOOONG time since I wrote any C code.
Rob
=============================
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Rob
=============================
Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement