是否可以用于case 1
一个标题和case 2
另一个?因为当我在程序中使用这两个标题时,我遇到了ambiguous symbol
错误。
标题 1(winapifunctions.h)
#include <Windows.h>
void CallWindowProc(String^ windowtitle)
{
};
标题 2(classes.h)
using namespace System;
using namespace System::Collections::Generic;
public delegate void Super();
public ref class Event{};
public ref class MyException:public DivideByZeroException{};
public interface class IType{};
public interface class IVal{};
public ref class Writer abstract{};
public ref class Check: public Writer,public IType,public IVal
.....other classes
主程序
#include "stdafx.h"
#include "classes.h"
#include "winapifunctions.h"
int main(array<System::String^>^ args)
{
//read x
switch(x){ case 1: {CallWindowProc("title");break;} case 2: { Check^ obj = gcnew Check();break;}
};
和错误 -IServiceProvider:ambiguous symbol