Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › C++ help and quick please
New Posts  All Forums:Forum Nav:

C++ help and quick please

post #1 of 9
Thread Starter 
OK, so im writing a stupid program that takes a yacht's 4 test results and averages them. is the average is over a certian number it displays one thing, under displays another. the program works but when i go to run it it closes out after the last cin (that it the rest flashes up and closes immediatly) . . any suggestions on what it could be? . . ill post the code momentarily
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
post #2 of 9
try

system("PAUSE");

right before the return 0; it should ask the user to press enter before the program closes
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
post #3 of 9
I was just going to type that haha, do what kamakazi said
x
(12 items)
 
  
CPUMotherboardRAMHard Drive
AMD FX-8350 Black Edition ASUS SABERTOOTH 990FX  Crucial Ballistix Elite Western Digital 
Optical DriveCoolingOSKeyboard
Asus CORSAIR Hydro Series H55 Quiet Edition Windows 8 Logitec  
MouseMouse PadAudioAudio
Microcenter Microcenter Senheisser HD25II AIAIAI TMA-1 
  hide details  
Reply
x
(12 items)
 
  
CPUMotherboardRAMHard Drive
AMD FX-8350 Black Edition ASUS SABERTOOTH 990FX  Crucial Ballistix Elite Western Digital 
Optical DriveCoolingOSKeyboard
Asus CORSAIR Hydro Series H55 Quiet Edition Windows 8 Logitec  
MouseMouse PadAudioAudio
Microcenter Microcenter Senheisser HD25II AIAIAI TMA-1 
  hide details  
Reply
post #4 of 9
Thread Starter 
sweet. . . did the trick . . and let this be a lesson to all . . go to class and dont wait till the last minute to do your homework!
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
post #5 of 9
Yeah, I have a C++ assignment due monday, thankfully I didnt procrastinate this time. But it isnt done because I can't figure out a sorting algorithm.
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
post #6 of 9
Thread Starter 
i acually had mine all done last week . .. just been too lazy to post until now lol
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
 
ESXi Server
(10 items)
 
HTPC
(13 items)
 
CPUMotherboardGraphicsRAM
i7-4790K Asus Sabertooth Mark 2 Radeon HD 6950 GSkill Sniper Series 
Hard DriveCoolingOSMonitor
Samsung XP941 Noctura NH-D14 8.1 Pro QNIX 27" @ 1440, AOC 27" @ 1080, Dell 24" @ 1080 
KeyboardPowerCaseMouse
Corsair K95 PC&P 750 NZXT H2 Logitech G500s 
CPUHard DriveHard DriveHard Drive
Phenom II x4 965 WE Red Seagate Intel SSD 
Hard DriveCoolingOSOS
WR Raptor  Silenx Fans x2 120mm Win 7 x2 Unraid 
OSCase
pfsense Rackmount 16 bay hot-swap 
CPUMotherboardGraphicsRAM
i3 2100t Gigabyte integrated 2x 8GB GSkill 
Hard DriveCoolingOSMonitor
OCZ SSD Stock Win7 - Plex Shell Sony XBR2 
PowerCase
Generic 350 watt Repurposed Vidabox 
  hide details  
Reply
post #7 of 9
Nice.
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
post #8 of 9
most of my proffessors will not teach PAUSE it's 'bad form' apparently...pish anyways if they're like my profs then try putting in a perss any key bit at the end so it stays there till they hit something, then it exits.
Brrrrrrrr...
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8600 @ 5500GHz Asus P5K Prem. Black Pearl eVGA 8800GT SC 512Mb 2x2Gb OCZ ReaperX 
Hard DriveOptical DriveOSMonitor
2x250Gb + 1x1Tb Seagate Perps in RAID0 Samsung Sata DVD-RW Vista Business x64 2 x 22" LG Flatron's 
KeyboardPowerCaseMouse
Logitech UltraX OCZ GameXtreme 700W Lian Li PC65 Black (Modded) Logitech G7 Carbon 
Mouse Pad
Glossy School Thing 
  hide details  
Reply
Brrrrrrrr...
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8600 @ 5500GHz Asus P5K Prem. Black Pearl eVGA 8800GT SC 512Mb 2x2Gb OCZ ReaperX 
Hard DriveOptical DriveOSMonitor
2x250Gb + 1x1Tb Seagate Perps in RAID0 Samsung Sata DVD-RW Vista Business x64 2 x 22" LG Flatron's 
KeyboardPowerCaseMouse
Logitech UltraX OCZ GameXtreme 700W Lian Li PC65 Black (Modded) Logitech G7 Carbon 
Mouse Pad
Glossy School Thing 
  hide details  
Reply
post #9 of 9
yeah, my teachers frown on the PAUSE thing also, havent used it since I got here, just remember it from, well, sometime I dont remember but it just sticks with me for some reason.
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
Eowyn
(13 items)
 
  
CPUMotherboardGraphicsRAM
1055T x6 Biostar TA890FXE MSI 465(470)TFII GE 750/1900 G.Skill 2x2GB DDR3 
Hard DriveOSMonitorKeyboard
WD 640AAKS Ubuntu 10.10 2x24" Asus MS Arc 
PowerCaseMouse
610 PC P&C Silencer P182 Logitech Marathon 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › C++ help and quick please