Convert string to int (GUI)

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2009
Posts: 1
Reputation: karjan is an unknown quantity at this point 
Solved Threads: 0
karjan karjan is offline Offline
Newbie Poster

Re: Help Need Urgently - C++ Gui

 
0
  #1
May 23rd, 2009
how i can convert string to int in c++ gui mode
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 155
Reputation: amrith92 is on a distinguished road 
Solved Threads: 18
amrith92's Avatar
amrith92 amrith92 is offline Offline
Junior Poster

Re: Help Need Urgently - C++ Gui

 
1
  #2
May 23rd, 2009
Originally Posted by karjan View Post
how i can convert string to int in c++ gui mode
Please, refrain from hijacking threads. It would just confuse anyone having the same difficulty as the OP, and would make our jobs of attempting to answer to the original question difficult. If you have a question, like the one you asked, search the forum and see if the problem has been addressed before, and iff it hasn't, start a new thread stating your problem.
"C++ : Where friends have access to your private members."
C++: You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,847
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 753
Team Colleague
Narue's Avatar
Narue Narue is online now Online
Senior Bitch

Re: Convert string to int (GUI)

 
2
  #3
May 23rd, 2009
Split to a new thread.

>how i can convert string to int in c++ gui mode
"GUI mode" is irrelevant. The process is the same. Have you tried a stringstream?
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string>
  4.  
  5. int main()
  6. {
  7. std::istringstream in ( "10" );
  8. int i;
  9.  
  10. in>> i;
  11. std::cout<< i * i <<'\n';
  12. }
New members chased away this month: 4
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC