943,648 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3019
  • C++ RSS
Jul 9th, 2008
0

Problem with CString.Format

Expand Post »
Hi friends,
Kindly help me in this...i have to print the values of input and languagepair
i tried this first

CString Add(CString input,CString languagePair)
{
CString url ;
url.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text= %s &langpair= %s ", input, languagePair);
}
i got error
then i tried this
CString Add(CString input,CString languagePair)
{
CString url ;
url.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text= {0}&langpair= {0} ", input, languagePair);
}
Thanks in advalce...sherin
Similar Threads
Reputation Points: 6
Solved Threads: 0
Newbie Poster
angelsherin is offline Offline
20 posts
since Jun 2008
Jul 9th, 2008
0

Re: Problem with CString.Format

Hi friends,
Kindly help me in this...i have to print the values of input and languagepair
i tried this first

CString Add(CString input,CString languagePair)
{
CString url ;
url.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text= %s &langpair= %s ", input, languagePair);
}
i got error
then i tried this
CString Add(CString input,CString languagePair)
{
CString url ;
url.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text= {0}&langpair= {0} ", input, languagePair);
}
Thanks in advalce...sherin

Could be little bit clear in explaining the error. i tried compiling your code and it works Perfect in my VC6.0 Compiler.
Reputation Points: 11
Solved Threads: 5
Newbie Poster
Aashath is offline Offline
18 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Type initialization
Next Thread in C++ Forum Timeline: Not reading or outputting file with no error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC