August 15, 2011

kalster kalster
Lab Rat
315 posts

[SOLVED] convert a string to a variable and visa versa

 

is there an easy way to convert a string to a variable and visa versa and without using sstream?

6 replies

August 15, 2011

1+1=2 1+1=2
Ant Farmer
316 posts

what do you mean by “variable” here?

August 15, 2011

kalster kalster
Lab Rat
315 posts

int

August 15, 2011

1+1=2 1+1=2
Ant Farmer
316 posts

Read the manual:

http://doc.qt.nokia.com/4.7/qstring.html#toInt

August 15, 2011

kalster kalster
Lab Rat
315 posts

i can’t find the int to string conversion in the docs. anyone knows where it is?

August 15, 2011

rokemoon rokemoon
Lab Rat
197 posts

Try this [doc.qt.nokia.com]

August 15, 2011

kalster kalster
Lab Rat
315 posts

thank you.

 
  ‹‹ [Solved] QWidget assumes allocation on heap, not stack?      [SOLVED] Adding horizontal scroll bar to a QSplitter ››

You must log in to post a reply. Not a member yet? Register here!