c++提示1 error(s), 0 warning(s) 找不到哪里出错了
//addsamenuandsave-asitemtothecurrentlyactivedocumenttype//voidCSwsinglemenuApp.docCr...
//adds a menu and save-as item to the currently active document type
//
void CSwsinglemenuApp.docCreateMenu(long DocumentType)
{
HRESULT hres;
VARIANT_BOOL bres;
LPFRAME pFrame;
hres=m_pSldWorks->IFrameObject(&pFrame);
//add menu
hres=pFrame->Addmenu(auT("Solidworks下拉菜单测试"),swMenuPosition,&bres);
//add menu item
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 0"),swLastPosition,
auT("swsinglemenu@MenuItemCB0,swsinglemenu application menu item"),&bres);
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 1"),swLastPosition,
auT("swsinglemenu@MenuItemCB1,swsinglemenu application menu item"),&bres);
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 2"),swLastPosition,
auT("swsinglemenu@MenuItemCB2,swsinglemenu application menu item"),&bres);
//add file save-as item
hres=m_pSldWorks->AddFileSaveAsItem(auT("swsinglemenu@SaveAsCB"),
auT("xampl\nswsinglemenu save(*.xampl)"),DocumentType,&bres);
//clean up
pFrame->Release();
}
:\尝试\试试.cpp(3) : error C2143: syntax error : missing ';' before '.'
D:\尝试\试试.cpp(3) : error C2182: 'CSwsinglemenuApp' : illegal use of type 'void'
D:\尝试\试试.cpp(3) : error C2143: syntax error : missing ';' before '.'
D:\尝试\试试.cpp(4) : error C2143: syntax error : missing ';' before '{'
D:\尝试\试试.cpp(4) : error C2447: missing function header (old-style formal list?)
执行 cl.exe 时出错.
试试.obj - 1 error(s), 0 warning(s) 展开
//
void CSwsinglemenuApp.docCreateMenu(long DocumentType)
{
HRESULT hres;
VARIANT_BOOL bres;
LPFRAME pFrame;
hres=m_pSldWorks->IFrameObject(&pFrame);
//add menu
hres=pFrame->Addmenu(auT("Solidworks下拉菜单测试"),swMenuPosition,&bres);
//add menu item
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 0"),swLastPosition,
auT("swsinglemenu@MenuItemCB0,swsinglemenu application menu item"),&bres);
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 1"),swLastPosition,
auT("swsinglemenu@MenuItemCB1,swsinglemenu application menu item"),&bres);
hres=pFrame->AddmenuItem(
auT("Solidworks下拉菜单测试"),auT("测试项目 2"),swLastPosition,
auT("swsinglemenu@MenuItemCB2,swsinglemenu application menu item"),&bres);
//add file save-as item
hres=m_pSldWorks->AddFileSaveAsItem(auT("swsinglemenu@SaveAsCB"),
auT("xampl\nswsinglemenu save(*.xampl)"),DocumentType,&bres);
//clean up
pFrame->Release();
}
:\尝试\试试.cpp(3) : error C2143: syntax error : missing ';' before '.'
D:\尝试\试试.cpp(3) : error C2182: 'CSwsinglemenuApp' : illegal use of type 'void'
D:\尝试\试试.cpp(3) : error C2143: syntax error : missing ';' before '.'
D:\尝试\试试.cpp(4) : error C2143: syntax error : missing ';' before '{'
D:\尝试\试试.cpp(4) : error C2447: missing function header (old-style formal list?)
执行 cl.exe 时出错.
试试.obj - 1 error(s), 0 warning(s) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询