cannot convert from 'const CString' to 'const char *

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 :-(




Answer this question

cannot convert from 'const CString' to 'const char *