EDN Admin
Well-known member
<P>when i move my code from VC6 to VC8, following code is error. WriteLogFile in Line 4367</P>
<P>Code:</P>
<P> if(endcon<img src="/MSDN//emoticons/emotion-55.gif" alt="Idea" />.entry_type != VOC_ENTRY_ARRAY_END)
{
WriteLogFile(2, "Voc: !! 语音板%d的通道%d播放语音失败,结束条件没有设置最终项", cardid, channelid);
gChannelStruct[cardid][channelid].StateMutex.Unlock();
return -1;
}
</P>
<P>Error:</P>
<P>d:workvoccard apivoccard.cpp(4367) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
d:workvoccard apivoccard.cpp(4367) : error C2001: newline in constant
d:workvoccard apivoccard.cpp(4368) : error C2146: syntax error : missing ) before identifier gChannelStruct</P>
<P> </P>
<P>After i add a blank to my string, error disappear</P>
<P>Code:</P>
<P> if(endcon<img src="/MSDN//emoticons/emotion-55.gif" alt="Idea" />.entry_type != VOC_ENTRY_ARRAY_END)
{
WriteLogFile(2, "Voc: !! 语音板%d的通道%d播放语音失败,结束条件没有设置最终项 ", cardid, channelid);
gChannelStruct[cardid][channelid].StateMutex.Unlock();
return -1;
}
</P>
<P>Result:</P>
<P>d:workvoccard apivoccard.cpp(4367) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
More:</P>
<P>The complier often report "warning C4819" in some line where there are no Unicode string.</P>
View the full article
<P>Code:</P>
<P> if(endcon<img src="/MSDN//emoticons/emotion-55.gif" alt="Idea" />.entry_type != VOC_ENTRY_ARRAY_END)
{
WriteLogFile(2, "Voc: !! 语音板%d的通道%d播放语音失败,结束条件没有设置最终项", cardid, channelid);
gChannelStruct[cardid][channelid].StateMutex.Unlock();
return -1;
}
</P>
<P>Error:</P>
<P>d:workvoccard apivoccard.cpp(4367) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
d:workvoccard apivoccard.cpp(4367) : error C2001: newline in constant
d:workvoccard apivoccard.cpp(4368) : error C2146: syntax error : missing ) before identifier gChannelStruct</P>
<P> </P>
<P>After i add a blank to my string, error disappear</P>
<P>Code:</P>
<P> if(endcon<img src="/MSDN//emoticons/emotion-55.gif" alt="Idea" />.entry_type != VOC_ENTRY_ARRAY_END)
{
WriteLogFile(2, "Voc: !! 语音板%d的通道%d播放语音失败,结束条件没有设置最终项 ", cardid, channelid);
gChannelStruct[cardid][channelid].StateMutex.Unlock();
return -1;
}
</P>
<P>Result:</P>
<P>d:workvoccard apivoccard.cpp(4367) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
More:</P>
<P>The complier often report "warning C4819" in some line where there are no Unicode string.</P>
View the full article