锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美在线不卡视频,国产精品免费网站在线观看,欧美激情一区二区久久久http://m.shnenglu.com/lyman/category/2016.htmlI like c & c++!zh-cnWed, 25 Feb 2009 11:53:56 GMTWed, 25 Feb 2009 11:53:56 GMT60鐢盇CE涓殑涓縐嶅嚱鏁拌皟鐢ㄦ柟寮忔兂鍒扮殑鎶宸?/title>http://m.shnenglu.com/lyman/archive/2009/02/25/74899.html鍚嶇窘鍚嶇窘Wed, 25 Feb 2009 09:32:00 GMThttp://m.shnenglu.com/lyman/archive/2009/02/25/74899.htmlhttp://m.shnenglu.com/lyman/comments/74899.htmlhttp://m.shnenglu.com/lyman/archive/2009/02/25/74899.html#Feedback0http://m.shnenglu.com/lyman/comments/commentRss/74899.htmlhttp://m.shnenglu.com/lyman/services/trackbacks/74899.html
#include <iostream> usingnamespace std;
class CA { public: CA() { cc =1; };
int func1(int a, int x) { cout<<"func1"<<endl;
cc = a + x; cout<<"cc is :"<< cc <<endl; return cc; } int func2(int a, int y) { cout<<"func2"<<endl; cc = cc + a * y; cout<<"cc is:"<<cc<<endl; return cc; }
typedef int (CA::*FUNC)(int a, int y);
int Test1() { FUNC f; f =&CA::func2;
return (this->*f) (10, 20); }
int test2(FUNC func,int a, int b) { //ACE涓槸鍏堝仛涓浜涘叡鍚岀殑澶嶆潅鐨勪簨,鐒跺悗璋冪敤涓嶅悓鐨刦unc閮ㄥ垎: return (this->*func)(a,b); } private: int cc; };
int main( void ) { CA a; a.Test1(); a.test2(&CA::func2,11,3); return0; }
#include <iostream> usingnamespace std; class CB { public: virtualint func1(int a, int x)=0; virtualint func2(int a, int x)=0; typedef int (CB::*FUNC)(int a, int y);
int Test1() { FUNC f; f =&CB::func2; return (this->*f) (10, 20); }
int test2(FUNC func,int a, int b) { return (this->*func)(a,b); } };
class CA:public CB { public: CA() { cc =1; };
int func1(int a, int x) { cout<<"func1"<<endl;
cc = a + x; cout<<"cc is :"<< cc <<endl; return cc; } int func2(int a, int y) { cout<<"func2"<<endl; cc = cc + a * y; cout<<"cc is:"<<cc<<endl; return cc; }
]]>Link errors for __argv, __argc, __mbctype http://m.shnenglu.com/lyman/archive/2006/06/22/8827.html鍚嶇窘鍚嶇窘Thu, 22 Jun 2006 03:48:00 GMThttp://m.shnenglu.com/lyman/archive/2006/06/22/8827.htmlhttp://m.shnenglu.com/lyman/comments/8827.htmlhttp://m.shnenglu.com/lyman/archive/2006/06/22/8827.html#Feedback0http://m.shnenglu.com/lyman/comments/commentRss/8827.htmlhttp://m.shnenglu.com/lyman/services/trackbacks/8827.htmlWindows: Using MFC, get unresolved external symbol errors for __argv, __argc, __mbctype
I am trying to use the MFC library. In the project c/c++ code generation type, I have changed the runtime library to Multithreaded DLL.
When I then compile the program it links with the multi threaded libraries but I get the following errrors:
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
The solution: When you use the multithreaded dll's in visual c++.NET, you need to specify that you are using MFC in a shared dll. This is specified in the project settings.