how do i convert a const CString to a const char *
my code is as follows..
connect(const CSting &hostname)
{
...................
host = gethostbyname(hostname);
............
}
the line gethostname causes the error, and the compiler says
cannot convert from 'const CString' to 'const char *'
how can i convert I am using VS2005 :-(

cannot convert from 'const CString' to 'const char *
zviruga
Take a look at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1034&SiteID=1 for similar issue.
Thanks, Ayman Shoukry VC++ Team