Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » int <-> String conversions
int <-> String conversions [message #622] Sun, 22 January 2006 14:41 Go to previous message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
I created a small dummy application with a StaticText and a Button. The Button is supposed to increment the int value displayed in the StaticText.
MyApp::MyApp()
{
  CtrlLayout(*this, "Window title");
  plus <<= THISBACK(onPlus);
  text.SetText("0");
  Zoomable().Sizeable();
}

void MyApp::onPlus()
{
  int val = StdConvertInt().Scan(text.GetText());
  text.SetText(StdConvertInt().Format(val + 1).ToString());
}

Is there a more simple way to do what onPlus does? It seems ugly.

[Updated on: Sun, 22 January 2006 14:41]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need help...
Next Topic: regex (assembly) from boost
Goto Forum:
  


Current Time: Thu Jun 13 06:14:13 CEST 2024

Total time taken to generate the page: 0.02381 seconds