CString::SetAt
-
hello @all, i want to fill a CString. i tried this:
hs1=0; CString m_strTest1; CString minus("-"); m_strTest1.SetAt(hs1, 'minus');
but it does not work. can anybody help me? thanks, sunnyhi...:) you have made an error.
void SetAt( int iChar, XCHAR ch );
CString::SetAt can add only char.not word!! what do you want to do? -
hello @all, i want to fill a CString. i tried this:
hs1=0; CString m_strTest1; CString minus("-"); m_strTest1.SetAt(hs1, 'minus');
but it does not work. can anybody help me? thanks, sunny:omg: What do you do? Use this code for filling a
CString
variable:CString var=_T("Hello World!");
Now, var filled with "Hello World!" string. A. Riazi
-
hello @all, i want to fill a CString. i tried this:
hs1=0; CString m_strTest1; CString minus("-"); m_strTest1.SetAt(hs1, 'minus');
but it does not work. can anybody help me? thanks, sunnySunnygirl wrote: m_strTest1.SetAt(hs1, 'minus');
SetAt()
expects a character, not a string. You've given a string but encoded it as a character. This will spit out a compiler warning, and is not correct. Just do this;CString m_strTest1;
m_strTest1 = "minus";Hope this helps, Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact" -
hello @all, i want to fill a CString. i tried this:
hs1=0; CString m_strTest1; CString minus("-"); m_strTest1.SetAt(hs1, 'minus');
but it does not work. can anybody help me? thanks, sunny