Convert Integer to CString
-
hello, i have one integer array....{1,12,3,64,555} i need to convert each integer as "CString" i try to use Format() like ex: CString str; int i=0; str.Format("%d",i); It wasa giving an Error. Can any one help me in this regard. Thanks in advance....!!!!!:rose:
I can't see anything wrong with this code. What error are you getting?
-
hello, i have one integer array....{1,12,3,64,555} i need to convert each integer as "CString" i try to use Format() like ex: CString str; int i=0; str.Format("%d",i); It wasa giving an Error. Can any one help me in this regard. Thanks in advance....!!!!!:rose:
phanindra varma wrote:
str.Format("%d",i);
Are you doing a fully Unicode build? Are you missing the _T macro? Have you tried:
str.Format(_T("%d"),i);
instead?Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
-
phanindra varma wrote:
str.Format("%d",i);
Are you doing a fully Unicode build? Are you missing the _T macro? Have you tried:
str.Format(_T("%d"),i);
instead?Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
That's pretty much the only explanation for this code to fail...
-
hello, i have one integer array....{1,12,3,64,555} i need to convert each integer as "CString" i try to use Format() like ex: CString str; int i=0; str.Format("%d",i); It wasa giving an Error. Can any one help me in this regard. Thanks in advance....!!!!!:rose:
phanindra varma wrote:
It wasa giving an Error.
Turn your monitor around so we can see it. :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
phanindra varma wrote:
It wasa giving an Error.
Turn your monitor around so we can see it. :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
:laugh: :laugh:
-
phanindra varma wrote:
str.Format("%d",i);
Are you doing a fully Unicode build? Are you missing the _T macro? Have you tried:
str.Format(_T("%d"),i);
instead?Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
Thanks..... I forget _T(); Thanks again.. because Even for this silly question also u r guided me in a rigtt way.... Bye....
-
phanindra varma wrote:
It wasa giving an Error.
Turn your monitor around so we can see it. :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
:laugh: How much I love your comments.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
-
phanindra varma wrote:
It wasa giving an Error.
Turn your monitor around so we can see it. :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
:laugh: You have powrful eyes. :-D
-
Thanks..... I forget _T(); Thanks again.. because Even for this silly question also u r guided me in a rigtt way.... Bye....
That's fine, but please make sure that you provide all the necessary information with your query, so that it would be easier for others to help you. You said there was an error, but did not say what it was. Take care of these things in the future.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
-
Thanks..... I forget _T(); Thanks again.. because Even for this silly question also u r guided me in a rigtt way.... Bye....
In addition to what Rajesh said, I would also advice you not to use SMS text while posting messages here. :)
Regards, Vijay.
-
:laugh: How much I love your comments.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
Rajesh R Subramanian wrote:
How much I love your comments.
:-D
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>
-
That's fine, but please make sure that you provide all the necessary information with your query, so that it would be easier for others to help you. You said there was an error, but did not say what it was. Take care of these things in the future.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]
O.k Thanks for the Suggestion !!!!!