|
-
February 19th, 2004, 12:36 PM
#1
'const string' to 'char *'
Hello !!
How can I convert a 'const string' to 'char *' ?
I have the following code:
int validateXMLfile(char *xmlFile_name);
int Processor::InsertOrder( const string file )
{
int error=0;
error = validateXMLfile( file );
if( error == 1 ) {
cout << "\nERROR VALIDATING file: " << file << endl;
return error;
}
else {
cout << "Order VALIDATED against schema OK "<< endl;
}
}
I get the following compiling error:
Processor::InsertOrder (basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >)':
Processor.cc:586: cannot convert `const string' to `char *' for
argument `1' to `validateXMLfile (char *)'
Thanks!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|