Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 02-04-08   #1 (permalink)
Overclocker
 
intel ati

Join Date: May 2007
Location: Houston, Texas
Posts: 4,528

Rep: 184 mth91 is acknowledged by manymth91 is acknowledged by many
Unique Rep: 135
Trader Rating: 7
Default Bloodshed problem

I just copied the original hello world program from the bloodshed guide, and when I compile and execute the program, the window that is supposed to stay open, just immediately closes, so I just see a quick flash of the output. What can I do to fix this?

Code:
#include <stdio.h>
int main()
{
    printf("Hello Worldn");
    return 0;
}
That's the code right there, I just opened up bloodshed, copied that code, pasted it into the console, then compiled and executed it. Why will it not show the output properly?

System: Rig
CPU
Q6600 3.43 GHz 1.368v load
Motherboard
MSI P6N SLI-FI
Memory
2GB Crucial Ballistix DDR2-800
Graphics Card
Visiontek HD4850
Hard Drive
250 GB WD SATA 3.0Gb/s + 320GB Maxtor SATA 3.0Gb/s
Sound Card
Integrated
Power Supply
Ultra XVS 700W 40A Single 12V rail
Case
Cooler Master Elite 330
CPU cooling
Tuniq Tower 120
GPU cooling
Thermaltake DuOrb
OS
Windows XP Pro
Monitor
Hanns-G HG-216DPO

Last edited by mth91 : 02-04-08 at 11:05 PM.
mth91 is offline   Reply With Quote
Old 02-05-08   #2 (permalink)
Miscelaneous
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,933
Blog Entries: 3

Rep: 289 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 188
Folding Team Rank: 904
Trader Rating: 0
Default

It would help to tell us the language since many languages inherit from each other.

System: Uzicht #4
CPU
Athlon X2 5200+ Windsor
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
4x WD1600AAJS RAID0
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Xigmatec Rifle
GPU cooling
Stock Saphire 3870 Cooling
OS
Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19"Wide
Licht is online now I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Old 02-05-08   #3 (permalink)
Overclocker
 
intel ati

Join Date: May 2007
Location: Houston, Texas
Posts: 4,528

Rep: 184 mth91 is acknowledged by manymth91 is acknowledged by many
Unique Rep: 135
Trader Rating: 7
Default

Whoops, sorry, C++.

System: Rig
CPU
Q6600 3.43 GHz 1.368v load
Motherboard
MSI P6N SLI-FI
Memory
2GB Crucial Ballistix DDR2-800
Graphics Card
Visiontek HD4850
Hard Drive
250 GB WD SATA 3.0Gb/s + 320GB Maxtor SATA 3.0Gb/s
Sound Card
Integrated
Power Supply
Ultra XVS 700W 40A Single 12V rail
Case
Cooler Master Elite 330
CPU cooling
Tuniq Tower 120
GPU cooling
Thermaltake DuOrb
OS
Windows XP Pro
Monitor
Hanns-G HG-216DPO
mth91 is offline   Reply With Quote
Old 02-06-08   #4 (permalink)
Programmer
 
intel ati

Join Date: Aug 2006
Location: Moscow, ID
Posts: 160

Rep: 10 Safetydan Unknown
Unique Rep: 9
Folding Team Rank: 1404
Trader Rating: 1
Default

Code:
#include <stdio.h>
int main()
{
    printf("Hello World\n");
    system("PAUSE");
    return 0;
}
Try pausing at the end like that.
__________________
"He attacked everything in life with a mix of extraordinary genius and naive incompetence, and it was often difficult to tell which was which."
Douglas Adams

System: Monster v2
CPU
Q6600 G0
Motherboard
GA-P35-DS3L
Memory
2GB Crucial Ballistix
Graphics Card
Saphire Radeon x1900XTX
Hard Drive
WD 320GB
Sound Card
x-fi extreme music (modded)
Power Supply
OCZ 700W
Case
Gigabyte 3D aurora
CPU cooling
TR Ultra-120 Extreme
GPU cooling
vf900
OS
Windows XP
Monitor
2x Acer 22" WS
Safetydan is offline I fold for Overclock.net   Reply With Quote
Old 02-11-08   #5 (permalink)
AMD Overclocker
 
Starholdest's Avatar
 
amd nvidia

Join Date: Mar 2007
Location: █♣█
Posts: 939
Blog Entries: 1

Rep: 43 Starholdest is acknowledged by some
Unique Rep: 38
Hardware Reviews: 1
Trader Rating: 0
Default

Safetydan, that will work, but from what I've read it puts a lot of stress onto the system as it has to call it and all this other stuff first. Not only that but that code will only work on Windows, not a *NIX based system. I was just looking for something like this today, you can always do something like this:

Code:
char reply;


cout << "Press any key and then enter to quit: ";
cin >> reply;
return 0;
__________________

Volkswagen Enthusiasts of OCN


Aumotocnic "An unfortunate member of the overclock.net insomnia club"

Quebec Overclockers - 8019 in 3dMark06

s939 Manny 4600+ @ 2809Mhz @ 1.425V (9 hours Orthos blend test stable - 24/7 Usage) - http://valid.x86-secret.com/show_oc.php?id=289741
@ 2945Mhz @ 1.45V - http://valid.x86-secret.com/show_oc.php?id=276669

System: Beast from the East
CPU
AMD x2 4600+ @ 2.8Ghz
Motherboard
Asus A8N-SLI SE
Memory
2GB Kingston Value DDR400
Graphics Card
Asus 8800GTS 320MB
Hard Drive
80G Seagate SATA
Sound Card
SoundBlaster Audigy SE
Power Supply
Thermaltake Purepower 500W
Case
Antec 900 (modded)
CPU cooling
AS5 + Zalman CNPS9700 LED
GPU cooling
Stock
OS
Windows Vista Ultimate
Monitor
Samsung Syncmaster 730B (17" yay!)
Starholdest is offline Starholdest's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 03:07 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.24877 seconds with 8 queries