我有一个抽象类,我想知道是否可以使用变量参数列表定义一个抽象函数?
如果可能的话给我一个例子.
我尝试在我的MFC项目中使用静态库,但是我收到以下链接器错误:
1>------ Build started: Project: Csetkliens, Configuration: Debug Win32 ------
1>Build started 2012.05.20. 16:12:49.
1>InitializeBuildStatus:
1> Touching "Debug\Csetkliens.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> All outputs are up-to-date.
1>ResourceCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP100D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z) already defined …Run Code Online (Sandbox Code Playgroud) 我尝试获取对ArrayList元素的引用,但是我失败了.
ArrayList<String> test = new ArrayList<String>();
test.add("zero");
test.add("one");
test.add("two");
String s1 = test.get(1);
String s2 = test.get(1);
System.out.println(test.get(1) +" " + s1 + " " + s2);
s1 += " modificated";
System.out.println(test.get(1) +" " + s1 + " " + s2);
Run Code Online (Sandbox Code Playgroud)
有什么建议?