New Posts  All Forums:Forum Nav:

C++ Help please..

post #1 of 7
Thread Starter 
Hi,check
Edited by PigLetPInk - 4/7/12 at 8:29pm
Satellite L745D
(13 items)
 
  
CPUGraphicsRAMHard Drive
AMD A6-3400M None. 4GB 550 GB 
OSMonitorKeyboardCase
windows 7 laptop Black Keyboard laptop 
Mouse
Logitech Optical Mouse 
  hide details  
Reply
Satellite L745D
(13 items)
 
  
CPUGraphicsRAMHard Drive
AMD A6-3400M None. 4GB 550 GB 
OSMonitorKeyboardCase
windows 7 laptop Black Keyboard laptop 
Mouse
Logitech Optical Mouse 
  hide details  
Reply
post #2 of 7
you are checking for a lowercase y, but your input will always be uppercase due to toupper().
eyefinity
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 2600K EVGA E685 Radeon HD 6970 Radeon HD 6970 
RAMRAMHard DriveCooling
G.Skill SNIPER G.Skill SNIPER Crucial M4 128GB 6970 EK Water Block Acetal + Nickel 
CoolingCoolingCoolingOS
Swiftech MCR320-QP Radiator Swiftech MCP655 Pump EK Supreme HF CPU Block Windows 7 Ultimate 
MonitorMonitorMonitorKeyboard
Dell E228WFP Dell E228WFP Dell P2210 G510 
PowerCaseMouseMouse Pad
TX850 HAF932 BE G500 XTRAC PADS Ripper 
Audio
G930 
  hide details  
Reply
eyefinity
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 2600K EVGA E685 Radeon HD 6970 Radeon HD 6970 
RAMRAMHard DriveCooling
G.Skill SNIPER G.Skill SNIPER Crucial M4 128GB 6970 EK Water Block Acetal + Nickel 
CoolingCoolingCoolingOS
Swiftech MCR320-QP Radiator Swiftech MCP655 Pump EK Supreme HF CPU Block Windows 7 Ultimate 
MonitorMonitorMonitorKeyboard
Dell E228WFP Dell E228WFP Dell P2210 G510 
PowerCaseMouseMouse Pad
TX850 HAF932 BE G500 XTRAC PADS Ripper 
Audio
G930 
  hide details  
Reply
post #3 of 7
Code:
.....
             cout << " ..... Yes Or No";
             shapingtype = _getche();
             shapingtype = tolower(shapingtype);

             switch ( shapingtype )
{
case 'y' : 
cout << "If perforated , please choose type:" << endl;
cout << "\1. Corner Pin " << endl;
cout << "\2. Glue Ribbon" << endl;
cout << "\3. Your choice :";
TypePerforated= _getche();
cout << endl;
default : break;
}
Try that
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #4 of 7
Code:
.....
             cout << " ..... Yes Or No";
             shapingtype = _getche();
             shapingtype = toupper(shapingtype);

             switch ( shapingtype )
{
case 'Y' : 
cout << "If perforated , please choose type:" << endl;
cout << "\1. Corner Pin " << endl;
cout << "\2. Glue Ribbon" << endl;
cout << "\3. Your choice :";
TypePerforated= _getche();
cout << endl;
default : break;
}
simply change the lower case 'y' to 'Y' lulz

why not just use "cin" statements in place of "_getche();"
post #5 of 7
you can have

switch(char)
case 'Y':
case 'y':
#your code here#

and it will execute on either Y or y...
post #6 of 7
Wouldn't an if have been better in this case? Since he is only checking for one case, the "Y"/"y" one.
First Build
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-2600k @4.5Ghz Gigabyte Z68X-UD7 B3 MSI 6950 G.Skill Sniper 2x4GB 
Hard DriveHard DriveHard DriveCooling
Crucial M4 64GB Samsung SpinPoint 250GB Hitachi 1TB Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows Server 2012 Samsung S22B300 22' ViewSonic VA703B 17" CM Quickfire TK 
PowerCaseMouse
Corsair HX850 NZXT Phantom Mionix Naos 3200 
  hide details  
Reply
First Build
(17 items)
 
  
CPUMotherboardGraphicsRAM
i7-2600k @4.5Ghz Gigabyte Z68X-UD7 B3 MSI 6950 G.Skill Sniper 2x4GB 
Hard DriveHard DriveHard DriveCooling
Crucial M4 64GB Samsung SpinPoint 250GB Hitachi 1TB Noctua NH-D14 
OSMonitorMonitorKeyboard
Windows Server 2012 Samsung S22B300 22' ViewSonic VA703B 17" CM Quickfire TK 
PowerCaseMouse
Corsair HX850 NZXT Phantom Mionix Naos 3200 
  hide details  
Reply
post #7 of 7
Thread Starter 
ok thank you everyone, I really missed the lower Y..ahhaa it's so totally me..


This was just the part ONE of the project, so that's why there is only one case...

Satellite L745D
(13 items)
 
  
CPUGraphicsRAMHard Drive
AMD A6-3400M None. 4GB 550 GB 
OSMonitorKeyboardCase
windows 7 laptop Black Keyboard laptop 
Mouse
Logitech Optical Mouse 
  hide details  
Reply
Satellite L745D
(13 items)
 
  
CPUGraphicsRAMHard Drive
AMD A6-3400M None. 4GB 550 GB 
OSMonitorKeyboardCase
windows 7 laptop Black Keyboard laptop 
Mouse
Logitech Optical Mouse 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming