Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › C++ Float to string conversion
New Posts  All Forums:Forum Nav:

C++ Float to string conversion - Page 2

post #11 of 20
SetClipboardData is a Win32 native call. You'd need a lot of messing about with marshaling and IntPtr types for this to work from managed code.

There are managed implementations of this, which you can use from your managed C++ code.


The method you want is Clipboard::SetText()

For example:
Code:
Clipboard::SetText( secondnum.ToString() );

See here: http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard.aspx
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #12 of 20
My edits aren't taking place...

SetClipboardData is a Win32 native call. Documentation for it is here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.85%29.aspx

The first parameter is a UINT specifying the data type you want to store on the clipboard. (in your code you're trying to pass it a string!)
The second is a handle to the data in the specified format. (in your code you're passing NULL, which does nothing).

You'd need a lot of messing about with marshaling and IntPtr types for this to work from managed code.

There are managed implementations of this, which you can use from your managed C++ code.


The method you want is Clipboard::SetText()

For example:
Code:
Clipboard::SetText( secondnum.ToString() );

See here: http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard.aspx
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #13 of 20
My edits aren't taking place...
Okay this is getting annoying now... third edit...

SetClipboardData is a Win32 native call. Documentation for it is here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.85%29.aspx

The first parameter is a UINT specifying the data type you want to store on the clipboard. (in your code you're trying to pass it a string!)
The second is a handle to the data in the specified format. (in your code you're passing NULL, which does nothing).

You'd need a lot of messing about with marshaling and IntPtr types for this to work from managed code.

There are managed implementations of this, which you can use from your managed C++ code.


The method you want is Clipboard::SetText()

For example:
Code:
Clipboard::SetText( secondnum.ToString() );

See here: http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard.aspx
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #14 of 20
Thread Starter 
thanks a bunch, the documentation i read before stated that you could use "any generic type of data as a unit" which is apparently untrue...
so do i still need to do this?
Code:
OpenClipboard;
Clipboard::SetText(secondnum.ToString());

// Or this?

Clipboard::SetText(secondnum.ToString());

basically do i still need to open the clipboard for this call to work?
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
post #15 of 20
Quote:
Originally Posted by GFreak45 View Post

thanks a bunch, the documentation i read before stated that you could use "any generic type of data as a unit" which is apparently untrue...
so do i still need to do this?
You can, but you need to do it properly when using the native Win32 SetClipboardData function and it is more work from managed C++, because you need to allocate unmanaged memory, stash your data in there, and then throw it at the SetClipboardData function.
Quote:
Originally Posted by GFreak45 View Post

Code:
OpenClipboard;
Clipboard::SetText(secondnum.ToString());
// Or this?
Clipboard::SetText(secondnum.ToString());
basically do i still need to open the clipboard for this call to work?

You are free to just call Clipboard::SetText(), which is a managed code implementation of the clipboard which does all the dirty work for you. You don't need to open the clipboard or anything. Just call the method and be done with it! smile.gif
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #16 of 20
Thread Starter 
cool thanks smile.gif having some issues with how the code is updating the text, but its nothing i cant handle, probably forgot a function call somewhere or something... thumb.gif
ill post the actual app here when i finish it... not that anyone needs a calculator app or anything
just as an example of how to do a nice little beginner exercise and for other people to "grade" the code
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
post #17 of 20
Thread Starter 
ok, another issue...
Code:
private: System::Void btn1_Click(System::Object^  sender, System::EventArgs^  e) {
                                 if (firstorsecond)
                                 {
                                         if (decimal)
                                         {
                                                 decimaldiv = decimaldiv*10;
                                                 firstnum = firstnum+(1/decimaldiv);
                                                 updateText();
                                         }
                                         else
                                         {
                                                 firstnum = (firstnum*10)+1;
                                                 updateText();
                                         }
                                 }
                                 else
                                 {
                                         if (decimal)
                                         {
                                                 decimaldiv = decimaldiv*10;
                                                 secondnum = secondnum+(1/decimaldiv);
                                                 updateText();
                                         }
                                         else
                                         {
                                                 secondnum = secondnum*10+1;
                                                 updateText();
                                         }
                                 }
                         }
its not updating the text that is in firstnum or secondnum...
and when i click the label to copy it, it was working, but now its giving me an error saying windows has to end the clipboard operation because, pretty sure the issue is an infinitum loop because it requests a break;
heres my update text code and label click code:
Code:
void updateText()
{
        if (!firstorsecond)
        {
                if (answer == 0 || firstnum != 0)
                {
                        lblText->Text = firstnum.ToString();
                }
                else
                {
                        lblText->Text = answer.ToString();
                }
        }
        else
        {
                        lblText->Text = secondnum.ToString();
        }
};



        private: System::Void Text_Click(System::Object^  sender, System::EventArgs^  e) {
                                 if (!firstorsecond)
                                 {
                                         if (answer == 0 || firstnum != 0)
                                         {
                                                 Clipboard::SetText(firstnum.ToString());
                                         }
                                         else
                                         {
                                                 Clipboard::SetText(answer.ToString());
                                         }
                                 }
                                 else
                                 {
                                         Clipboard::SetText(secondnum.ToString());
                                 }
                         }
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
post #18 of 20
Thread Starter 
ok scratch that last post, the !firstorsecond screwed me up, it should have not had the ! lol
now i have it working almost perfectly, sometimes it takes a few clicks to get the clipboard copied right but still smile.gif

apparently it is too large to upload onto this site, so here is a link

anyone who wants to learn how to do something like this, the basics are right here
after you watch that its pretty understandable...
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
post #19 of 20
Quote:
Originally Posted by GFreak45 View Post

ok scratch that last post, the !firstorsecond screwed me up, it should have not had the ! lol
now i have it working almost perfectly, sometimes it takes a few clicks to get the clipboard copied right but still smile.gif
apparently it is too large to upload onto this site, so here is a link
anyone who wants to learn how to do something like this, the basics are right here
after you watch that its pretty understandable...

Hmm... it shouldn't....
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
Ol' Sandy
(30 items)
 
"Zeus"
(13 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i5 2500K (4.5ghz @ 1.320v) Gigabyte Z68X-UD3R-B3 MSI R7970 Lightning Corsair 16GB (4x4GB) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Westone W3 IEMs RE-272 IEMs Shure SE-215 IEMs Schiit Bifrost DAC 
AudioAudio
Schiit Asgard 2 amp HiVi Swan M50W 2.1 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1320 v3 Super Micro X10SAE GeForce 6200 32GB 1333MHz 
Hard DriveOptical DriveOSPower
4x WD RE4 1TB on-host (Adaptec 6805E RAID 10) 2x Crucial M500 480GB, 2x WD RE4 500GB on-host ... Windows Server 2012 R2 x64 SeaSonic SS-400FL2 
Case
Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD elementaryOS "Luna" 
  hide details  
Reply
post #20 of 20
Thread Starter 
i had the same error with it as the first, basicaly, when firstorsecond = true its supposed to either copy the first number, or second number, but i had a ! there that shouldnt have been, so it was copying the 2nd number which was always 0 in that instance...

anyway its working perfectly now, check out the uploaded app
it works pretty nicely
my next projects:
Sudoku
Scientific calculator that takes strings and shows the user how it "disects it"
ie:
"5x + 10 = 8x - 2" will print this:

5x + 10 = 8x - 2
5x + 10 + 2 = 8x - 2 + 2
5x + 12 - 5x = 8x - 5x
3x / 3 = 12 / 3
x = 4

BUT i want it to handle multiple variables and the math order of operations, ie: ^ > () > *, / > +,-
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
Yin
(13 items)
 
Yang
(14 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-2600K Sandy Bridge ASUS P8Z68-V PRO PowerColor AX6950 2GBD5-2DH G.SKILL Ripjaws X Series 8GB (2 x 4GB) 
Hard DriveCoolingOSMonitor
Crucial M4 CT128M4SSD2 2.5" SSD Hyper 212 EVO Windows 7 x64 Acer V243HAJbd Black 24" 2ms(GTG) Widescreen 
KeyboardPowerCaseMouse
Microsoft SideWinder X6 Black Keyboard Win USB ... SeaSonic X Series X650 Gold XCLIO Color I Black Steel / Plastic ATX Mid Tow... Microsoft Wireless Mobile Mouse 4000 
Mouse Pad
Black Tightened Leather Circle 
CPUMotherboardGraphicsRAM
Intel Core i7-3960X Extreme Edition Sandy Bridg... ASUS Maximus IV Extreme-Z LGA 1155 Intel Z68 Asus Mars II GeForce GTX 580 x2 (Fermi) 3GB Patriot Gamer 2 Series 16GB (2 x 8GB) 
Hard DriveOptical DriveCoolingOS
OCZ RevoDrive 3 X2 series RVD3X2-FHPX4 SSD HP DVD-ROM Drive Model 481045-B21 Hyper 212 Evo x4 Windows 7 
MonitorKeyboardPowerCase
NEC Display Solutions LCD2190UXp-BK Black 21.3" x2 RAZER Black USB Wired BlackWidow Ultimate Mecha... CISCO PWR-C45-1300ACV Catalyst 4500 Series 1300... Sentey Black Box Series BX2-4292 v2.1 / 4xUSB /... 
MouseAudio
Logitech G700 Black 13 Buttons Tilt Wheel USB R... BOSE Companion 2 Series 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › C++ Float to string conversion