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-22-08   #21 (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

Quote:
Originally Posted by The Bartender Paradox View Post
You can do it with just a char. Yes starts with a y. When you cin >> tax_option it writes just the first letter of what ever was entered to tax_option. So if the input is yes or y tax_option will still get the value y. Of course if the user entered yes, the e and the s would still be in the input buffer. Since you are restarting the program it would probably be beneficial to clear the input buffer. You can do that by using cin.ignore(5, 'n') where the 5 indicates how many characters you would like to ignore, and the 'n' is alternatively what character you would like to stop on. So cin.ignore(5, 'n') says ignore the next five characters or up until the newline character, which ever comes first. Hope that helps
Thank you, but I still haven't figured out how to do the while loop. My question is 4 posts above.
__________________

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
Old 02-22-08   #22 (permalink)
Every base is base 10
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,009
Blog Entries: 1

Rep: 566 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

Code:
int main ()   
{
    do{
    cout << "How much money do you want to convert?: ";
    cin >> money;
    cout << "Do you want to calculate tax? (y/n): ";
    cin >> tax_option;
    
    if(tax_option == 'y')
    {
           cout << "What % is the tax?: ";
           cin >> tax_number;  
    }

    convert_money(money, tax_number, tax_option);
    
    do{
        cout << "nnDo you want to restart? (y/n): ";
        cin >> quit;
    }while(quit != 'y' && quit != 'n');
    }while(quit == 'y');
}
The do while around the restart prompt forces them to type y or n
__________________
BIG BROTHER
Apple doesn't love you

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 02-22-08   #23 (permalink)
Linux Lobbyist
 
FearMeansControl's Avatar
 
intel nvidia

Join Date: Aug 2007
Location: Wrong Island, NY
Posts: 1,132

Rep: 76 FearMeansControl is acknowledged by some
Unique Rep: 66
Folding Team Rank: 51
Trader Rating: 2
Default

... speaking of currency converters, OS X has one in the dashboard ^_^

Next time I hit a code snag, I'm gonna ask here, this coding section is so active..
__________________
Quote:
Originally Posted by ENTERPRISE View Post
I would reccomend opening task manager and closing the process ''IntelFanboy.exe''
Q6600
(450x8) (417x9) (425x9)

System: Jesus PC v5.3
CPU
Q6600
Motherboard
Gigabyte X38-DS4
Memory
OCZ PC-8000 4x2 GB
Graphics Card
Quadro FX-4600 & FX-1400
Hard Drive
3x2500JS RAID 0, 2x7200.11 500GB RAID 1
Sound Card
Presonus Firepod + Yamaha HS-5M's
Power Supply
OCZ StealthxStream 600W
Case
RocketPwn
CPU cooling
Fuzion v2, mcw-30, GTX 360, D5, CD Waterfall Res.
GPU cooling
Stock, re-applied with AS5
OS
Gentoo, XP x64
Monitor
Samsung Syncmaster 2253LW + 2x17" LCD's
FearMeansControl is online now I fold for Overclock.net   Reply With Quote
Old 02-22-08   #24 (permalink)
Mmmm! Toast!
 
hometoast's Avatar
 
intel nvidia

Join Date: Sep 2007
Location: Pennsylvania
Posts: 1,270

Rep: 97 hometoast is acknowledged by some
Unique Rep: 80
Folding Team Rank: 335
Trader Rating: 8
Default

Quote:
Originally Posted by FearMeansControl View Post
... speaking of currency converters, OS X has one in the dashboard ^_^

Next time I hit a code snag, I'm gonna ask here, this coding section is so active..
and if you're online, Google's got one too: 149.99 USD in GBP

System: Fishtoast
CPU
e6750 @ 3.2Ghz
Motherboard
DFI Blood Iron
Memory
4x1G GSkill HZs @960
Graphics Card
eVGA 8800GT 512 @675/950
Hard Drive
2xWD 320 AAKS Raid0
Sound Card
on-board. (linux!=xfi)
Power Supply
PP&C 610W Silencer
Case
Modded Rocketfish
CPU cooling
Apogee GTX Coppertop
GPU cooling
Dtek GFX2+Unisink
OS
Vista Ultimate 64
Monitor
Samsung 204BW
hometoast is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 02-22-08   #25 (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

Thanks for all your help guys. I know Google has one like this online...but this was just a test.

I don't really see any big uses for C++...could someone name some to me? :S
__________________

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
Old 02-22-08   #26 (permalink)
Off By 340 Undecillion
 
The Bartender Paradox's Avatar
 
amd nvidia

Join Date: Oct 2004
Location: Portland, Oregon
Posts: 2,338

Rep: 306 The Bartender Paradox is a proven memberThe Bartender Paradox is a proven memberThe Bartender Paradox is a proven memberThe Bartender Paradox is a proven member
Unique Rep: 234
Folding Team Rank: 448
Hardware Reviews: 1
Trader Rating: 3
Default

Quote:
Originally Posted by Starholdest View Post
Thanks for all your help guys. I know Google has one like this online...but this was just a test.

I don't really see any big uses for C++...could someone name some to me? :S
Big things like Operating systems, office suites, engineering tools, etc.
__________________

A rocket powered land shark attached to a giant freakin' laser beam.
Congratulations! You have found the secret text! You get a cookie.

System: My System
CPU
AMD A64 3500+ Winchester
Motherboard
DFI nF4 SLi-DR
Memory
OCZ 4000VX
Graphics Card
EVGA 7800GT
Hard Drive
Maxtor 300Gb 16Mb Buffer
Sound Card
computers make sounds?
Power Supply
OCZ PowerStream 520W
Case
None
CPU cooling
Big
GPU cooling
Bigger
OS
XP Pro
Monitor
SOYO LCD
The Bartender Paradox is online now I fold for Overclock.net Overclocked Account The Bartender Paradox's Gallery   Reply With Quote
Old 02-22-08   #27 (permalink)
Every base is base 10
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,009
Blog Entries: 1

Rep: 566 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

Quote:
Originally Posted by Starholdest View Post
Thanks for all your help guys. I know Google has one like this online...but this was just a test.

I don't really see any big uses for C++...could someone name some to me? :S
Are you serious? It has all of the speed, efficiency, and low-levelness of C and all of the advantages and simplicity that Object-oriented languages such as Java give.
__________________
BIG BROTHER
Apple doesn't love you

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 02-22-08   #28 (permalink)
Mmmm! Toast!
 
hometoast's Avatar
 
intel nvidia

Join Date: Sep 2007
Location: Pennsylvania
Posts: 1,270

Rep: 97 hometoast is acknowledged by some
Unique Rep: 80
Folding Team Rank: 335
Trader Rating: 8
Default

Quote:
Originally Posted by Starholdest View Post
Thanks for all your help guys. I know Google has one like this online...but this was just a test.

I don't really see any big uses for C++...could someone name some to me? :S
what good is it? you use it to write programs... ANY program.

System: Fishtoast
CPU
e6750 @ 3.2Ghz
Motherboard
DFI Blood Iron
Memory
4x1G GSkill HZs @960
Graphics Card
eVGA 8800GT 512 @675/950
Hard Drive
2xWD 320 AAKS Raid0
Sound Card
on-board. (linux!=xfi)
Power Supply
PP&C 610W Silencer
Case
Modded Rocketfish
CPU cooling
Apogee GTX Coppertop
GPU cooling
Dtek GFX2+Unisink
OS
Vista Ultimate 64
Monitor
Samsung 204BW
hometoast is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 02-22-08   #29 (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

Quote:
Originally Posted by hometoast View Post
what good is it? you use it to write programs... ANY program.
Can it be used to write programs that aren't DOS based? I hope that made some sense...
__________________

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
Old 02-22-08   #30 (permalink)
Every base is base 10
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,009
Blog Entries: 1

Rep: 566 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 338
FAQs Submitted: 6
Trader Rating: 5
Default

Quote:
Originally Posted by Starholdest View Post
Can it be used to write programs that aren't DOS based? I hope that made some sense...
You can use a compiler to compile the C code into machine code. Machine code is binary code that can be executed by the CPU directly.
__________________
BIG BROTHER
Apple doesn't love you

IS WATCHING

System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   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 02:23 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.39776 seconds with 8 queries