|
-
February 15th, 2007, 08:10 PM
#1
every single program crashes help me please!!
I need help everytime i compile the code it says no errrors or anything. All it does is crash sooner than it opens please tell me if anyone has ever had this happen. I use bloodshed dev C++. its driving my a bit insane somone!
-
February 15th, 2007, 08:14 PM
#2
Re: every single program crashes help me please!!
 Originally Posted by joerules22
I need help everytime i compile the code it says no errrors or anything.
You mean like this:
Code:
int main()
{
char *p = 0;
*p = 'x';
}
All it does is crash sooner than it opens please tell me if anyone has ever had this happen.
The program above compiles with no errors, and it can crash when you run it.
So show your code.
Regards,
Paul McKenzie
-
February 15th, 2007, 08:36 PM
#3
Re: every single program crashes help me please!!
Im just learning c++ this is what i just made and it does the same.
#include <iostream>
using namespace std;
int main ()
{
int a;
int b;
int result;
cout << "enter your addition equation";
result = a + b;
cout << result;
return 0;
}
-
February 15th, 2007, 09:07 PM
#4
Re: every single program crashes help me please!!
-
February 15th, 2007, 09:14 PM
#5
Re: every single program crashes help me please!!
Hmm aside from that you didn't initialize your variables, the code is fine.
Please check your compiler and project settings.
-Andy
-
February 15th, 2007, 09:16 PM
#6
Re: every single program crashes help me please!!
whenever i open any exe that opens in command prompt it crashes... i just found this out... any ideas?
-
February 15th, 2007, 09:22 PM
#7
Re: every single program crashes help me please!!
You mean if you start cmd.exe and then open, let's say "calc.exe" ?
What's your operating system? It is likely that the O/S is at fault here...
-
February 15th, 2007, 09:27 PM
#8
Re: every single program crashes help me please!!
it just seems to be programs that i have compiled. Ive downloaded a bunch of soucecode everything i have compiled has crashed. I have another computer and these same programs work. My OS is XP what the hell is going on? ?
-
February 15th, 2007, 09:45 PM
#9
Re: every single program crashes help me please!!
What do you mean by "crash" ? What error message gets shown ?
-
February 15th, 2007, 09:47 PM
#10
Re: every single program crashes help me please!!
it just comes up for a milisecond and poof is gone.
-
February 15th, 2007, 09:49 PM
#11
Re: every single program crashes help me please!!
Fix the uninitialized variables and run the program from the command-line.
Regards,
Paul McKenzie
-
February 15th, 2007, 09:52 PM
#12
Re: every single program crashes help me please!!
EVEN this program wont work!
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
-
February 15th, 2007, 10:03 PM
#13
Re: every single program crashes help me please!!
it just comes up for a milisecond and poof is gone.
IS NOT A CRASH
If you open a Command Prompt Window (so you get a C:> prompt), navigate to the directory with the .exe, and run the exe from the command line, Wjat Happens?
ps: The humnan eye is not capable of recognizing something that take only a millisecond. And neither is your computer monitor, so obviously your statement is also wrong.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
February 15th, 2007, 10:04 PM
#14
Re: every single program crashes help me please!!
Did you do what I stated? Open a command window, go to where the exe was created, and run it from the command line.
Do *not* run it by clicking on it in Windows Explorer, or from the Dev-C++ "run" option or anything like that.
Regards,
Paul McKenzie
-
February 15th, 2007, 10:09 PM
#15
Re: every single program crashes help me please!!
 Originally Posted by TheCPUWizard
IS NOT A CRASH
If you open a Command Prompt Window (so you get a C:> prompt), navigate to the directory with the .exe, and run the exe from the command line, Wjat Happens?
It's amazing how the simplest thing, i.e. just go to the directory and type in the name of the exe seems to escape so many of these new programmers. I mean, isn't that the way they're taught to run any compiled program?
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|