void CMyMediaPlayerView::OnFileOpen()
{
CFileDialog dlg(true);
char s\"wavefile(*.wav)\0*.wav\0midifile(*.midi)\0*.mid\0mp3file(*.mp3)\0mpegfile(*.mpeg)\0*.mpeg\vediofile(*.dat)\0*.dat\0Allfile(*.*)\0*.*\0\0";
dlg.m_ofn.lpstrFile=(LPSTR)s;
if(dlg.DoModal()==IDOK)
{
m_MP.SetFileName(dlg.GetFileName());
m_MP.Stop();
}
}Compiling...
MyMediaPlayerView.cpp
D:\Program Files\Microsoft Visual Studio\MyProjects\cl\MyMediaPlayer\MyMediaPlayerView.cpp(95) : error C2017: illegal escape sequence
D:\Program Files\Microsoft Visual Studio\MyProjects\cl\MyMediaPlayer\MyMediaPlayerView.cpp(95) : error C2143: syntax error : missing ';' before 'string'
Error executing cl.exe.MyMediaPlayer.exe - 2 error(s), 0 warning(s)
{
CFileDialog dlg(true);
char s\"wavefile(*.wav)\0*.wav\0midifile(*.midi)\0*.mid\0mp3file(*.mp3)\0mpegfile(*.mpeg)\0*.mpeg\vediofile(*.dat)\0*.dat\0Allfile(*.*)\0*.*\0\0";
dlg.m_ofn.lpstrFile=(LPSTR)s;
if(dlg.DoModal()==IDOK)
{
m_MP.SetFileName(dlg.GetFileName());
m_MP.Stop();
}
}Compiling...
MyMediaPlayerView.cpp
D:\Program Files\Microsoft Visual Studio\MyProjects\cl\MyMediaPlayer\MyMediaPlayerView.cpp(95) : error C2017: illegal escape sequence
D:\Program Files\Microsoft Visual Studio\MyProjects\cl\MyMediaPlayer\MyMediaPlayerView.cpp(95) : error C2143: syntax error : missing ';' before 'string'
Error executing cl.exe.MyMediaPlayer.exe - 2 error(s), 0 warning(s)
解决方案 »
- AfxMessageBox
- C#通过vc的dll去访问wmi失败
- 有其他方法实现strtok吗?
- 负值问题,请指教!
- 如何得到NmLock的状态?
- 菜鸟问题!
- VC6 Win32dll std::string 内存泄露
- Windows 2000 Platform SDK:RAS/Routing and RAS - Packet Filtering 有经验的来指导一下,没经验的来参观一下。谢谢!(zb_china)
- 为什么子对话框中的CRichEdit控件不显示文字和图片
- Duilib 使用CFileDialog 时一运行到这一句就报错,求解决!!!
- 什么工具能给出一个DLL中export function的函数声明?
- 哪个大侠知道 MoveWindow括号里的那几个参数都是指的什么意思,最好详细一点
或
char s[]="wavefile(*.wav)\0*.wav\0midifile(*.midi)\0*.mid\0mp3file(*.mp3)\0mpegfile(*.mpeg)\0*.mpeg\vediofile(*.dat)\0*.dat\0Allfile(*.*)\0*.*\0";
在最後要不要兩個\0都可以, 因為VC會自動加一個俾你, 所以1+1=2
编译完成后,执行文件时提示:声明失败。
怎么回事?