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 09-22-06   #1 (permalink)
4.0ghz
 
SoaDMTGguy's Avatar
 
intel nvidia

Join Date: Mar 2005
Location: Nottingham PA
Posts: 4,929

Rep: 306 SoaDMTGguy is a proven memberSoaDMTGguy is a proven memberSoaDMTGguy is a proven memberSoaDMTGguy is a proven member
Unique Rep: 227
FAQs Submitted: 2
Folding Team Rank: 1164
Hardware Reviews: 3
Trader Rating: 15
Default C++ coding help

I want to write a program that reads a number from the user, then prompts the user that many times to enter a value. However, I want it to put the value into a diferant variable each time. How would I go about doing this?
__________________
Quote:
Originally Posted by PaulTa View Post
I'm like Obi wan. I just pop in and out, offer vague comments and advice, and then tell you to use the force.

System: Teh MacBook!
CPU
Intel Core 2 Duo T7500 2.2 GHz
Motherboard
Apple MacBook Pro Stock Motherboard
Memory
4 GB (2x 2 GB) G.Skill DDR2 667 MHz DDR2
Graphics Card
nVidia GeForce Go 8600 GT 128 MB
Hard Drive
120 GB Fujitsu SATA150
Sound Card
Intel Sata Rosea HD Audio
Power Supply
Apple Stock Power Adapter
Case
15" Apple Aluminum MacBook Pro Case
CPU cooling
Stock
GPU cooling
Stock
OS
OS X 10.5 Leopard / Windows XP Pro / Fedora 8
Monitor
15" Apple LED Backlit MacBook Pro Matt Display
SoaDMTGguy is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 09-22-06   #2 (permalink)
Programmer
 
Shadyi's Avatar
 
amd ati

Join Date: Jul 2006
Location: Cairo
Posts: 86

Rep: 1 Shadyi Unknown
Unique Rep: 1
Trader Rating: 0
Default

create a class named value and put in the constructor a variable called whatever and make it equals to the argument (which is the entered value from the user).
you'll get the number from user
then make a for loop depending on that number
and create a pointer object of the class with the loop number as a label and the new value as an argument.
This will create each time an object called Value[1],[2],........etc and put each value in an object.
__________________
System: My System
CPU
Phenom 9850 Black Edition
Motherboard
Gigabyte MA790X-DS4
Memory
2GB Kingston DDR2 800
Graphics Card
Radeon HD3450
Hard Drive
WD Caviar® Blue™ 500 GB, 16 MB Cache, 7200
CPU cooling
Stock
OS
Windows Vista Ultimate (x64)
Monitor
ViewSonic GS790 19"
Shadyi is offline   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 09:02 PM.


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.19048 seconds with 8 queries