error C2664

S

Samant.Trupti

Hi,

I have to a project which I am converting it to Unicode. I am
getting following error. I am not sure How to fix it.

error C2664: 'LogFile::LogToFile' : cannot convert parameter 1 from
'const unsigned short [65]' to 'std::string'

The code is
#define MAIN_LOG_FILE ".\\ABC.log"

Defination LogToFile(std::string message, std::string fileName);

I am calling this LogToFile("My Name", MAIN_LOG_FILE)

I have tried using "L" and "_T" It is not working.

Can you please help?
Thanks
 
S

Samant.Trupti

  I have to a project which I am converting it to Unicode.  I am
getting following error.  I am not sure How to fix it.
error C2664: 'LogFile::LogToFile' : cannot convert parameter 1 from
'const unsigned short [65]' to 'std::string'
The code is
#define MAIN_LOG_FILE ".\\ABC.log"
Defination LogToFile(std::string message, std::string fileName);
I am calling this LogToFile("My Name", MAIN_LOG_FILE)
I have tried using "L" and "_T"  It is not working.
Can you please help?

Perhaps you should try 'std::wstring'...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask- Hide quoted text -

- Show quoted text -

Yes That what I did next. It works. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top