锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产日韩欧美久久,精品久久人人爽天天玩人人妻,久久精品亚洲精品国产欧美http://www.shnenglu.com/zaccheo/zh-cnTue, 06 May 2025 20:56:07 GMTTue, 06 May 2025 20:56:07 GMT60GCC4.1.2 涓?涓存椂瀵硅薄浣滀負鍙傛暟浼犻掔粰 const T& 緙栬瘧鎶ラ敊http://www.shnenglu.com/zaccheo/archive/2013/10/30/204001.htmlzaccheozaccheoWed, 30 Oct 2013 08:38:00 GMThttp://www.shnenglu.com/zaccheo/archive/2013/10/30/204001.htmlhttp://www.shnenglu.com/zaccheo/comments/204001.htmlhttp://www.shnenglu.com/zaccheo/archive/2013/10/30/204001.html#Feedback0http://www.shnenglu.com/zaccheo/comments/commentRss/204001.htmlhttp://www.shnenglu.com/zaccheo/services/trackbacks/204001.html
Copy constructor access check while initializing a reference.

Consider this code:

class A 
{
public:
  A();

private:
  A(const A&);   // private copy ctor
};

A makeA(void);
void foo(const A&);

void bar(void)
{
  foo(A());       // error, copy ctor is not accessible
  foo(makeA());   // error, copy ctor is not accessible

  A a1;
  foo(a1);        // OK, a1 is a lvalue
}

Starting with GCC 3.4.0, binding an rvalue to a const reference requires an accessible copy constructor. This might be surprising at first sight, especially since most popular compilers do not correctly implement this rule.

The C++ Standard says that a temporary object should be created in this context and its contents filled with a copy of the object we are trying to bind to the reference; it also says that the temporary copy can be elided, but the semantic constraints (eg. accessibility) of the copy constructor still have to be checked.

For further information, you can consult the following paragraphs of the C++ standard: [dcl.init.ref]/5, bullet 2, sub-bullet 1, and [class.temporary]/2.

Starting with GCC 4.3.0, GCC no longer gives an error for this case. This change is based on the intent of the C++ language committee. As of 2010-05-28, the final proposed draft of the C++0x standard permits this code without error.



zaccheo 2013-10-30 16:38 鍙戣〃璇勮
]]>
鏍囪ocx鎺т歡涓鴻剼鏈畨鍏?/title><link>http://www.shnenglu.com/zaccheo/archive/2013/04/24/199674.html</link><dc:creator>zaccheo</dc:creator><author>zaccheo</author><pubDate>Wed, 24 Apr 2013 02:30:00 GMT</pubDate><guid>http://www.shnenglu.com/zaccheo/archive/2013/04/24/199674.html</guid><wfw:comment>http://www.shnenglu.com/zaccheo/comments/199674.html</wfw:comment><comments>http://www.shnenglu.com/zaccheo/archive/2013/04/24/199674.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/zaccheo/comments/commentRss/199674.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/zaccheo/services/trackbacks/199674.html</trackback:ping><description><![CDATA[<p>MFC寮鍙戠殑OCX鎺т歡鍗充嬌浣跨敤浜嗙鍚嶃傚湪IE涓繍琛屾槸涔熶細鎻愮ず鈥滈〉闈腑鐨凮CX鐨勪氦浜掓槸涓嶅畨鍏ㄧ殑銆傘傘傘傗濄傝В鍐沖姙娉曟湁涓ょ</p> <p>鏂規(guī)1錛氫慨鏀笽E鐨勮緗細</p> <p><a href="http://www.shnenglu.com/images/cppblog_com/zaccheo/WindowsLiveWriter/ocx_9338/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.shnenglu.com/images/cppblog_com/zaccheo/WindowsLiveWriter/ocx_9338/image_thumb.png" width="247" height="277"></a> </p> <p>鏂規(guī)2錛氭爣璁版帶浠朵負鑴氭湰瀹夊叏鐨?/p> <p>鍦ㄥ伐紼嬩腑澧炲姞澶存枃浠?cathelp.h</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#ifndef _CATHELP_H_ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#define _CATHELP_H_ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#include <comcat.h> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT CreateComponentCategory(CATID catid, WCHAR* catDescription); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT RegisterCLSIDInCategory(REFCLSID clsid, CATID catid); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT UnRegisterCLSIDInCategory(REFCLSID clsid, CATID catid); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#endif</pre></pre> <p>澧炲姞cathelp.cpp</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#include "<span style="color: #8b0000">cathelp.h</span>" </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT CreateComponentCategory(CATID catid, WCHAR* catDescription) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> ICatRegister* pcr = NULL ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> HRESULT hr = S_OK ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (<span style="color: #0000ff">void</span>**)&pcr); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (FAILED(hr)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> hr; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Make sure the HKCR\Component Categories\{..catid...}</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// key is registered</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> CATEGORYINFO catinfo; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> catinfo.catid = catid; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> catinfo.lcid = 0x0409 ; <span style="color: #008000">// english</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Make sure the provided description is not too long.</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Only copy the first 127 characters if it is</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">int</span> len = wcslen(catDescription); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (len>127) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> len = 127; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> wcsncpy(catinfo.szDescription, catDescription, len); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Make sure the description is null terminated</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> catinfo.szDescription[len] = '\0'; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span>(pcr) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> { </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = pcr->RegisterCategories(1, &catinfo); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> pcr->Release(); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> } </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> hr; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">} </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT RegisterCLSIDInCategory(REFCLSID clsid, CATID catid) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Register your component categories information.</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> ICatRegister* pcr = NULL ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> HRESULT hr = S_OK ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (<span style="color: #0000ff">void</span>**)&pcr); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (SUCCEEDED(hr)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> { </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Register this category as being "implemented" by</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// the class.</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> CATID rgcatid[1] ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> rgcatid[0] = catid; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = pcr->RegisterClassImplCategories(clsid, 1, rgcatid); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> } </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (pcr != NULL) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> pcr->Release(); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> hr; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">} </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">HRESULT UnRegisterCLSIDInCategory(REFCLSID clsid, CATID catid) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> ICatRegister* pcr = NULL ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> HRESULT hr = S_OK ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = CoCreateInstance(CLSID_StdComponentCategoriesMgr, </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> NULL, CLSCTX_INPROC_SERVER, IID_ICatRegister, (<span style="color: #0000ff">void</span>**)&pcr); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (SUCCEEDED(hr)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> { </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// Unregister this category as being "implemented" by</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// the class.</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> CATID rgcatid[1] ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> rgcatid[0] = catid; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> hr = pcr->UnRegisterClassImplCategories(clsid, 1, rgcatid); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> } </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (pcr != NULL) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> pcr->Release(); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> hr; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}</pre></pre> <p> </p> <p>淇敼 ocx鐨?DllRegisterServer 鏂規(guī)硶</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#include "<span style="color: #8b0000">cathelp.h</span>" </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#include <objsafe.h><span style="color: #008000">//for CATID_SafeForInitializing</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">#include "<span style="color: #8b0000">SafeocxtestCtl.h</span>" </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">STDAPI DllRegisterServer(<span style="color: #0000ff">void</span>) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> AFX_MANAGE_STATE(_afxModuleAddrThis); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_TYPELIB); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (!COleObjectFactoryEx::UpdateRegistryAll(TRUE)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// 娉ㄥ唽鑴氭湰瀹夊叏</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span>( FAILED( CreateComponentCategory(CATID_SafeForScripting, L"<span style="color: #8b0000">Controls that are safely scriptable</span>") ) ) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span>( FAILED( CreateComponentCategory(CATID_SafeForInitializing, L"<span style="color: #8b0000">Controls safely initializable from persistent data</span>") ) ) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (FAILED( RegisterCLSIDInCategory( </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> CSafeocxtestCtrl::guid, CATID_SafeForScripting) )) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (FAILED( RegisterCLSIDInCategory( </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> CSafeocxtestCtrl::guid, CATID_SafeForInitializing) )) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> NOERROR; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">} </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"><span style="color: #008000">/////////////////////////////////////////////////////////////////////////////</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"><span style="color: #008000">// DllUnregisterServer - Removes entries from the system registry</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">STDAPI DllUnregisterServer(<span style="color: #0000ff">void</span>) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{ </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> AFX_MANAGE_STATE(_afxModuleAddrThis); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_TYPELIB); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">if</span> (!COleObjectFactoryEx::UpdateRegistryAll(FALSE)) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> ResultFromScode(SELFREG_E_CLASS); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #008000">// 鎺т歡瀹夊叏鍙嶅垵濮嬪寲</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> UnRegisterCLSIDInCategory( CSafeocxtestCtrl::guid, CATID_SafeForScripting); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> UnRegisterCLSIDInCategory( CSafeocxtestCtrl::guid, CATID_SafeForInitializing); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> <span style="color: #0000ff">return</span> NOERROR; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">} </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"></pre></pre> <p>緙栬瘧娉ㄥ唽灝監(jiān)K浜嗐?/p> <p> </p> <p>濡傛灉瑕佹煡鐪媜cx鏄惁鏄剼鏈畨鍏ㄧ殑銆傚湪娉ㄥ唽琛℉KEY_CLASSES_ROOT\CLSID\OCX鐨刢lsid\Implemented Categories\ 涓嬬湅涓涓嬫湁娌℃湁鈥渰7DD95801-9882-11CF-9FA9-00AA006C42C4}鈥?鍜屸渰7DD95802-9882-11CF-9FA9-00AA006C42C4}鈥?/p> <p>涓嬪浘灝辨槸鑴氭湰瀹夊叏鐨勶細</p> <p><a href="http://www.shnenglu.com/images/cppblog_com/zaccheo/WindowsLiveWriter/ocx_9338/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.shnenglu.com/images/cppblog_com/zaccheo/WindowsLiveWriter/ocx_9338/image_thumb_1.png" width="244" height="79"></a></p> <p> </p> <p>鍙傝冿細<a title="http://support.microsoft.com/kb/161873/en-us" >http://support.microsoft.com/kb/161873/en-us</a></p><img src ="http://www.shnenglu.com/zaccheo/aggbug/199674.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/zaccheo/" target="_blank">zaccheo</a> 2013-04-24 10:30 <a href="http://www.shnenglu.com/zaccheo/archive/2013/04/24/199674.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>centos6.0 涓婂畨瑁卌odeblocks12.11http://www.shnenglu.com/zaccheo/archive/2013/04/09/199280.htmlzaccheozaccheoTue, 09 Apr 2013 12:07:00 GMThttp://www.shnenglu.com/zaccheo/archive/2013/04/09/199280.htmlhttp://www.shnenglu.com/zaccheo/comments/199280.htmlhttp://www.shnenglu.com/zaccheo/archive/2013/04/09/199280.html#Feedback0http://www.shnenglu.com/zaccheo/comments/commentRss/199280.htmlhttp://www.shnenglu.com/zaccheo/services/trackbacks/199280.html涓昏鍙傝冧簡 錛?a title="http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_RPM_based_distributions" >http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_RPM_based_distributions

 

  1: #瀹夎 渚濊禆鐨勫紑鍙戝寘
  2: yum groupinstall "Development Tools"
  3: 
  4: #瀹夎 wxGTK錛屾垜榪欎釜浣跨敤鐨勬槸2.8.*嫻嬭瘯鏄彲浠ョ殑
  5: yum install wxGTK*
  6: 
  7: #涓嬭澆codeblocks瀹夎
  8: #http://www.codeblocks.org/downloads/binaries#linux 
  9: # codeblocks-12.11-1.el6.i686.tar.bz2 (CentOS/RedHat 6)
 10: 
 11: #鐒跺悗鏄В鍘嬪畨瑁?
 12: #瀹夎瀹屾垚鍚庯紝寤虹珛涓涓猦elloCB鐨勫伐紼嬶紝榪愯鏄彁紺?xTerm -T 澶辮觸銆傘傘?
 13: #浜庢槸
 14: yum install xterm
 15: # 瀹屾垚
 16: 


zaccheo 2013-04-09 20:07 鍙戣〃璇勮
]]>
centos 5.6 瀹夎mysqlhttp://www.shnenglu.com/zaccheo/archive/2013/03/29/198922.htmlzaccheozaccheoFri, 29 Mar 2013 07:52:00 GMThttp://www.shnenglu.com/zaccheo/archive/2013/03/29/198922.htmlhttp://www.shnenglu.com/zaccheo/comments/198922.htmlhttp://www.shnenglu.com/zaccheo/archive/2013/03/29/198922.html#Feedback0http://www.shnenglu.com/zaccheo/comments/commentRss/198922.htmlhttp://www.shnenglu.com/zaccheo/services/trackbacks/198922.html
  1: #!/bin/sh
  2: 	rpm -ivh mysql-5.0.77-4.el5_5.4.i386.rpm  --nodeps
  3: 	rpm -ivh perl-DBI-1.52-2.el5.i386.rpm
  4: 	rpm -ivh perl-DBD-MySQL-3.0007-2.el5.i386.rpm 
  5: 	
  6: 	rpm -ivh mysql-server-5.0.77-4.el5_5.4.i386.rpm
  7: ##璁劇疆MySQL鏈嶅姟闅忕郴緇熷惎鍔ㄨ嚜鍚姩
  8: 	chkconfig mysqld on
  9: 	echo "璁劇疆MySQL鏈嶅姟闅忕郴緇熷惎鍔ㄨ嚜鍚姩鎴愬姛"
 10: ##鍚姩MySQL鏈嶅姟
 11: 	echo "鍚姩MySQL鏈嶅姟鎴愬姛"
 12: 	/etc/rc.d/init.d/mysqld start
 13: ##鍏抽棴Linux鐨勯槻鐏鍔熻兘
 14: 	echo "闃茬伀澧欏凡鍏抽棴"
 15: 	chkconfig iptables off
 16: ##鎺堟潈root 榪滅▼
 17: 	grant all privileges on *.* to root@'%' identified 123456';
 18: 


zaccheo 2013-03-29 15:52 鍙戣〃璇勮
]]>
mysql 瑙﹀彂鍣ㄦ搷浣?/title><link>http://www.shnenglu.com/zaccheo/archive/2013/03/28/198895.html</link><dc:creator>zaccheo</dc:creator><author>zaccheo</author><pubDate>Thu, 28 Mar 2013 08:39:00 GMT</pubDate><guid>http://www.shnenglu.com/zaccheo/archive/2013/03/28/198895.html</guid><wfw:comment>http://www.shnenglu.com/zaccheo/comments/198895.html</wfw:comment><comments>http://www.shnenglu.com/zaccheo/archive/2013/03/28/198895.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/zaccheo/comments/commentRss/198895.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/zaccheo/services/trackbacks/198895.html</trackback:ping><description><![CDATA[<p>瀹氫箟瑙﹀彂鍣?</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: <a style="color: #0000ff" >USE</a> dbtest; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 2: DELIMITER ;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 3: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 4: <a style="color: #0000ff" >CREATE</a> <a style="color: #0000ff" >TRIGGER</a> tr_ondel_test1 AFTER <a style="color: #0000ff" >DELETE</a> <a style="color: #0000ff" >ON</a> testtable1 </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 5: <a style="color: #0000ff" >FOR</a> EACH ROW <a style="color: #0000ff" >BEGIN</a> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 6: <a style="color: #0000ff" >DELETE</a> <a style="color: #0000ff" >FROM</a> testtable2 <a style="color: #0000ff" >where</a> testtable2.FID= OLD.ID; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 7: <a style="color: #0000ff" >END</a>;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 8: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 9: DELIMITER ;</pre></pre> <p> </p> <p>鍒犻櫎瑙﹀彂鍣細</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: <a style="color: #0000ff" >DROP</a> <a style="color: #0000ff" >TRIGGER</a> dbtest.tr_ondel_test1;</pre></pre> <p>鏌ョ湅瑙﹀彂鍣細</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: SHOW TRIGGERS <a style="color: #0000ff" >FROM</a> dbtest; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 2: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 3: SHOW TRIGGERS <a style="color: #0000ff" >FROM</a> dbtest <a style="color: #0000ff" >LIKE</a> 鈥?ondel%鈥?</pre></pre> <p>瀵煎嚭瀛樺偍榪囩▼鍜岃Е鍙戝櫒錛?/p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: mysqldump -u root -p123456 <span style="color: #008000">--default-character-set=gbk --triggers dbtest >./bk.sql</span></pre></pre><img src ="http://www.shnenglu.com/zaccheo/aggbug/198895.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/zaccheo/" target="_blank">zaccheo</a> 2013-03-28 16:39 <a href="http://www.shnenglu.com/zaccheo/archive/2013/03/28/198895.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>mysql 瀛樺偍榪囩▼瀛楃闆?/title><link>http://www.shnenglu.com/zaccheo/archive/2013/03/22/198728.html</link><dc:creator>zaccheo</dc:creator><author>zaccheo</author><pubDate>Fri, 22 Mar 2013 10:00:00 GMT</pubDate><guid>http://www.shnenglu.com/zaccheo/archive/2013/03/22/198728.html</guid><wfw:comment>http://www.shnenglu.com/zaccheo/comments/198728.html</wfw:comment><comments>http://www.shnenglu.com/zaccheo/archive/2013/03/22/198728.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/zaccheo/comments/commentRss/198728.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/zaccheo/services/trackbacks/198728.html</trackback:ping><description><![CDATA[<p>鏁版嵁搴撻粯璁ゅ瓧絎﹂泦濡備笅錛?/p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: mysql> <a style="color: #0000ff" >use</a> ivm; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 2: <a style="color: #0000ff" >Database</a> changed </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 3: mysql> show variables <a style="color: #0000ff" <span style="color: #8b0000">%char%</span>'; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 4: +<span style="color: #008000">--------------------------+---------------------------------------------------------+</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 5: | Variable_name | <a style="color: #0000ff" >Value</a> | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 6: +<span style="color: #008000">--------------------------+---------------------------------------------------------+</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 7: | character_set_client | latin1 | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 8: | character_set_connection | latin1 | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 9: | character_set_database | gbk | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 10: | character_set_filesystem | <a style="color: #0000ff" >binary</a> | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 11: | character_set_results | latin1 | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 12: | character_set_server | latin1 | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 13: | character_set_system | utf8 | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 14: | character_sets_dir | D:\Program Files\MySQL\MySQL Server 5.0\share\charsets\ | </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 15: +<span style="color: #008000">--------------------------+---------------------------------------------------------+</span> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 16: 8 <a style="color: #0000ff" >rows</a> <a style="color: #0000ff" >in</a> <a style="color: #0000ff" >set</a> (0.00 sec) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 17: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 18: mysql></pre></pre> <p>鍦?ivm鏁版嵁搴撲腑鍒涘緩瀛樺偍榪囩▼鍙婅皟鐢ㄧ粨鏋滃涓嬶細</p><pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 1: delimiter ;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 2: <a style="color: #0000ff" >DROP</a> <a style="color: #0000ff" >PROCEDURE</a> <a style="color: #0000ff" >IF</a> <a style="color: #0000ff" >EXISTS</a> r_test; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 3: <a style="color: #0000ff" >CREATE</a> <a style="color: #0000ff" >PROCEDURE</a> r_test(<a style="color: #0000ff" >IN</a> inStr <a style="color: #0000ff" >VARCHAR</a>(255) ) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 4: <a style="color: #0000ff" >BEGIN</a> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 5: <a style="color: #0000ff" >SELECT</a> CHARSET(inStr); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 6: <a style="color: #0000ff" >END</a>;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 7: delimiter ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 8: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 9: #涓嬮潰鐨勮鍙ラ兘鎵ц澶辮觸,閿欒淇℃伅涓猴細Data too long <a style="color: #0000ff" >for</a> <a style="color: #0000ff" <span style="color: #8b0000">inStr</span>' <a style="color: #0000ff" >at</a> row 1 </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 10: call r_test('<span style="color: #8b0000">涓浗</span>'); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 11: call r_test(_gbk'<span style="color: #8b0000">涓浗</span>'); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 12: <a style="color: #0000ff" >SET</a> @china = _gbk'<span style="color: #8b0000">涓浗</span>'; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 13: CALL r_test(@china); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 14: #鎵ц鎴愬姛 榪斿洖鍊兼槸錛歭atin1 </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 15: call r_test('<span style="color: #8b0000">china</span>'); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 16: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 17: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 18: # 鍒涘緩瀛樺偍榪囩▼涓緗簡 鍙傛暟鐨勫瓧絎﹂泦 </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 19: delimiter ;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 20: <a style="color: #0000ff" >DROP</a> <a style="color: #0000ff" >PROCEDURE</a> <a style="color: #0000ff" >IF</a> <a style="color: #0000ff" >EXISTS</a> r_test2; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 21: <a style="color: #0000ff" >CREATE</a> <a style="color: #0000ff" >PROCEDURE</a> r_test2(<a style="color: #0000ff" >IN</a> inStr <a style="color: #0000ff" >VARCHAR</a>(255) <a style="color: #0000ff" >character</a> <a style="color: #0000ff" >set</a> gbk) </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 22: <a style="color: #0000ff" >BEGIN</a> </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 23: <a style="color: #0000ff" >SELECT</a> CHARSET(inStr); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 24: <a style="color: #0000ff" >END</a>;; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 25: delimiter ; </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 26: </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 27: #鎵ц鎴愬姛 榪斿洖鍊兼槸錛歡bk </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 28: call r_test2('<span style="color: #8b0000">涓浗</span>'); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 29: #鎵ц鎴愬姛 鍗充嬌鎵ц鍓嶈緗簡瀛楃闆嗘槸utf8榪斿洖鍊間粛鐒舵槸錛歡bk </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 30: call r_test2(_utf8'<span style="color: #8b0000">涓浗</span>'); </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 31: #鎵ц鎴愬姛 榪斿洖鍊兼槸錛歡bk </pre><pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"> 32: call r_test2('<span style="color: #8b0000">china</span>');</pre></pre><pre>緇撹錛?strong>鍒涘緩瀛樺偍榪囩▼鏃跺鏋滄病鏈夋寚瀹氬瓨鍌ㄨ繃紼嬬殑鍙傛暟鐨勫瓧絎﹂泦錛宮ysql鎬繪槸璁や負褰撳墠鐨勫弬鏁頒嬌鐢ㄧ殑鏄郴緇熺殑瀛楃闆?windows 涓?my.ini涓殑 default-character-set鎸囧畾)銆?/strong></pre><pre><strong>鍚﹀垯錛宮ysql鎬繪槸璁や負瀛樺偍榪囩▼鐨勫弬鏁頒嬌鐢ㄧ殑灝辨槸瀹氫箟鏃舵寚瀹氱殑瀛楃闆嗐?/strong></pre><pre><strong>闇瑕佹敞鎰忕殑鏄細涓婇潰鐨勮鍒欏拰褰撳墠鐨勮繛鎺ュ瓧絎﹂泦娌℃湁浠諱綍鐨勫叧緋伙紙浣跨敤mysql_options(m_pMySql, MYSQL_SET_CHARSET_NAME, "utf8")涔熶笉浼氭敼鍙橈級</strong></pre><img src ="http://www.shnenglu.com/zaccheo/aggbug/198728.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/zaccheo/" target="_blank">zaccheo</a> 2013-03-22 18:00 <a href="http://www.shnenglu.com/zaccheo/archive/2013/03/22/198728.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤PREPARE 鍔ㄦ佹墽琛宻ql璇彞http://www.shnenglu.com/zaccheo/archive/2013/02/21/197975.htmlzaccheozaccheoThu, 21 Feb 2013 06:15:00 GMThttp://www.shnenglu.com/zaccheo/archive/2013/02/21/197975.htmlhttp://www.shnenglu.com/zaccheo/comments/197975.htmlhttp://www.shnenglu.com/zaccheo/archive/2013/02/21/197975.html#Feedback0http://www.shnenglu.com/zaccheo/comments/commentRss/197975.htmlhttp://www.shnenglu.com/zaccheo/services/trackbacks/197975.html
  1: DROP TABLE IF EXISTS alarm;
  2: CREATE TABLE alarm     ( id int(11) NOT NULL  auto_increment, name    varchar(255) default NULL,PRIMARY KEY (id));
  3:  
  4: INSERT INTO alarm (name) aa');
  5: INSERT INTO alarm (name) bb');
  6:  
  7: DROP procedure if exists statalarm;
  8: delimiter // 
  9: create procedure statalarm()
 10: begin
 11: SET @id  = '1,2';
 12: 
 13: SET @sql = 'select * from alarm where id IN (?)';
 14: PREPARE stmt FROM @sql;
 15: /* 
 16:  娉ㄦ剰 EXECUTE 鐨勬渶緇堣鍙ユ槸錛歴elect * from alarm where id IN ('1,2');
 17:  鑰屼笉鏄?select * from alarm where id IN (1,2);
 18:  榪欐槸鍥犱負濡傛灉鐢ㄦ埛鍙橀噺鐨勫兼槸瀛楃涓詫紝鍦‥XECUTE鏃?浼氳嚜鍔ㄧ殑鍦ㄥ彉閲忕殑鍊煎墠鍚庡姞涓婂紩鍙?
 19:  */
 20: EXECUTE stmt USING @id;
 21: DEALLOCATE PREPARE stmt;
 22: /*
 23:  濡傛灉鎯寵 緇勬垚select * from alarm where id IN (1,2);鍙互浣跨敤涓嬮潰鐨勮鍙?
 24: */
 25: SET @sql = concat('select * from alarm where id IN (',@id,')');
 26: PREPARE stmt FROM @sql;
 27: EXECUTE stmt ;
 28: DEALLOCATE PREPARE stmt;
 29:  
 30: end;//
 31: delimiter ;


zaccheo 2013-02-21 14:15 鍙戣〃璇勮
]]>
欏圭洰渚濊禆澶氱駭so鐨勭紪璇?/title><link>http://www.shnenglu.com/zaccheo/archive/2013/02/05/197726.html</link><dc:creator>zaccheo</dc:creator><author>zaccheo</author><pubDate>Tue, 05 Feb 2013 01:07:00 GMT</pubDate><guid>http://www.shnenglu.com/zaccheo/archive/2013/02/05/197726.html</guid><wfw:comment>http://www.shnenglu.com/zaccheo/comments/197726.html</wfw:comment><comments>http://www.shnenglu.com/zaccheo/archive/2013/02/05/197726.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/zaccheo/comments/commentRss/197726.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/zaccheo/services/trackbacks/197726.html</trackback:ping><description><![CDATA[<p>鏈夐」鐩瓵鍦╩akefile涓?-lb浣跨敤浜哹.so 錛宐.so鍦╩akefile涓?lc 浣跨敤浜哻.so銆傚湪緙栬瘧A鏄鏋滄病鏈夋妸c.so鏀懼埌/usr/lib鎴?usr/local/lib涓嬶紝緙栬瘧浼氬嚭閿欍?/p> <p>絎竴涓В鍐蟲柟妗堝氨鏄妸c.so鏀懼埌/usr/lib鎴?/usr/local/lib涓嬨?/p> <p>絎簩縐嶈В鍐蟲柟妗堟槸 鍦╩akefile鏂囦歡涓畾涔?鐜鍙橀噺 LD_LIBRARY_PATH 璁劇疆鍊間負c.so鐨勫瓨鏀劇洰褰曘?/p> <table border="0" cellspacing="0" cellpadding="2" width="761"> <tbody> <tr> <td valign="top" width="759"> <p>#闅愬紡鍔犺澆鐨剆o渚濊禆鐨剆o濡傛灉涓嶆斁鍦?usr/lib鎴?usr/local/lib涓嬶紝灝遍渶瑕佹寚瀹氬埌 LD_LIBRARY_PATH涓?br>export LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH</p></td></tr></tbody></table><img src ="http://www.shnenglu.com/zaccheo/aggbug/197726.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/zaccheo/" target="_blank">zaccheo</a> 2013-02-05 09:07 <a href="http://www.shnenglu.com/zaccheo/archive/2013/02/05/197726.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>centos 娣誨姞涓枃鏀寔http://www.shnenglu.com/zaccheo/archive/2013/02/03/197691.htmlzaccheozaccheoSun, 03 Feb 2013 09:38:00 GMThttp://www.shnenglu.com/zaccheo/archive/2013/02/03/197691.htmlhttp://www.shnenglu.com/zaccheo/comments/197691.htmlhttp://www.shnenglu.com/zaccheo/archive/2013/02/03/197691.html#Feedback0http://www.shnenglu.com/zaccheo/comments/commentRss/197691.htmlhttp://www.shnenglu.com/zaccheo/services/trackbacks/197691.html1 瀹夎涓枃鏀寔
#yum groupinstall "Chinese Support"

2 淇敼閰嶇疆

# vim /etc/sysconfig/i18n

灝嗭細
LANG="en_US.UTF-8" 
SYSFONT="latarcyrheb-sun16"
淇敼涓猴細

LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN" 
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

3 娉ㄩ攢



zaccheo 2013-02-03 17:38 鍙戣〃璇勮
]]>
鎴愬憳妯$増鏂規(guī)硶vc鍜実++鐨勮娉曞樊寮?/title><link>http://www.shnenglu.com/zaccheo/archive/2013/01/10/197166.html</link><dc:creator>zaccheo</dc:creator><author>zaccheo</author><pubDate>Thu, 10 Jan 2013 07:15:00 GMT</pubDate><guid>http://www.shnenglu.com/zaccheo/archive/2013/01/10/197166.html</guid><wfw:comment>http://www.shnenglu.com/zaccheo/comments/197166.html</wfw:comment><comments>http://www.shnenglu.com/zaccheo/archive/2013/01/10/197166.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/zaccheo/comments/commentRss/197166.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/zaccheo/services/trackbacks/197166.html</trackback:ping><description><![CDATA[<p>foo.h</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> #ifndef _FOO_H_</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> <span style="color: #cc6633">#define</span> _FOO_H_</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> #include <stdio.h></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> #include<iostream></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> #include<<span style="color: #0000ff">string</span>></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> <span style="color: #0000ff">class</span> foo</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> <span style="color: #0000ff">public</span>:</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> template<typename T></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> <span style="color: #0000ff">void</span> Saytype(<span style="color: #0000ff">const</span> T&)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> std::cout <<<span style="color: #006080">"unrecognized type !"</span><<std::endl;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> <span style="color: #008000">// 涓嬮潰鐨勫叏鐗瑰寲鍦?vc6涓嬬紪璇戦氳繃錛屼絾g++ 4.1.2 緙栬瘧澶辮觸</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> <span style="color: #008000">// template<></span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span> <span style="color: #008000">// void Saytype<int>(const int & )</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> <span style="color: #008000">// {</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span> <span style="color: #008000">// std::cout<<" type is int";</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> <span style="color: #008000">// }</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> <span style="color: #008000">// g++涓婂彲浠ヤ嬌鐢ㄩ噸杞芥潵浠f浛鍏ㄧ壒鍖?/span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> <span style="color: #0000ff">void</span> Saytype(<span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> &)</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> std::cout<<<span style="color: #006080">" type is int"</span>;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> };</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29"> 29:</span> <span style="color: #cc6633">#endif</span></pre><!--CRLF--></div></div> <p>main.cpp</p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> #include <span style="color: #006080">"../include/foo.h"</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">int</span> main()</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> foo f;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> f.Saytype((unsigned <span style="color: #0000ff">int</span>)1);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> f.Saytype((<span style="color: #0000ff">int</span>)1);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span> <span style="color: #0000ff">return</span> 1;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> }</pre><!--CRLF--></div></div><img src ="http://www.shnenglu.com/zaccheo/aggbug/197166.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/zaccheo/" target="_blank">zaccheo</a> 2013-01-10 15:15 <a href="http://www.shnenglu.com/zaccheo/archive/2013/01/10/197166.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.sidongliiang.cn" target="_blank">99久久久久</a>| <a href="http://www.2218335.cn" target="_blank">99久久国产宗和精品1上映</a>| <a href="http://www.hnhanzhi.com.cn" target="_blank">伊人久久大香线蕉综合5g</a>| <a href="http://www.yes365cc.cn" target="_blank">国产精品99久久久久久人</a>| <a href="http://www.adidas2009.cn" target="_blank">亚洲精品乱码久久久久66</a>| <a href="http://www.abensky.cn" target="_blank">波多野结衣AV无码久久一区</a>| <a href="http://www.gvsx.cn" target="_blank">色青青草原桃花久久综合</a>| <a href="http://www.jiayubao.com.cn" target="_blank">久久亚洲色一区二区三区</a>| <a href="http://www.mmcase.cn" target="_blank">欧美一级久久久久久久大</a>| <a href="http://www.feschain.cn" target="_blank">久久青青草原精品国产不卡</a>| <a href="http://www.liuy88.cn" target="_blank">久久婷婷人人澡人人</a>| <a href="http://www.jn928.cn" target="_blank">久久这里有精品视频</a>| <a href="http://www.bclife.cn" target="_blank">思思久久99热只有频精品66</a>| <a href="http://www.htlon.cn" target="_blank">狠狠色丁香久久婷婷综合图片</a>| <a href="http://www.110xi.cn" target="_blank">久久99国产精品久久99小说</a>| <a href="http://www.caoyb.cn" target="_blank">久久久久久久久久久</a>| <a href="http://www.zhongxiangka.cn" target="_blank">亚洲精品高清国产一线久久</a>| <a href="http://www.up598.cn" target="_blank">a级成人毛片久久</a>| <a href="http://www.99341.cn" target="_blank">国内精品久久久久久久影视麻豆 </a>| <a href="http://www.zongjiagou.com.cn" target="_blank">久久狠狠一本精品综合网</a>| <a href="http://www.6ht.com.cn" target="_blank">久久精品国产99久久久香蕉</a>| <a href="http://www.smash6.cn" target="_blank">久久婷婷五月综合色99啪ak</a>| <a href="http://www.kiterunner.com.cn" target="_blank">一本一道久久a久久精品综合</a>| <a href="http://www.port1.com.cn" target="_blank">久久人人爽人人爽人人片AV高清</a>| <a href="http://www.3secshop.cn" target="_blank">免费精品久久天干天干</a>| <a href="http://www.028sihai.cn" target="_blank">国产精品久久久福利</a>| <a href="http://www.gzkyzc.com.cn" target="_blank">久久99热这里只有精品国产</a>| <a href="http://www.lwtjf.cn" target="_blank">一本色道久久88综合日韩精品</a>| <a href="http://www.7cdy.cn" target="_blank">久久久婷婷五月亚洲97号色</a>| <a href="http://www.571jia.cn" target="_blank">99久久人人爽亚洲精品美女</a>| <a href="http://www.shidaqizhong.cn" target="_blank">无码国内精品久久人妻麻豆按摩</a>| <a href="http://www.ccssoo.com.cn" target="_blank">久久精品一区二区三区AV</a>| <a href="http://www.qrcj.net.cn" target="_blank">狠狠88综合久久久久综合网</a>| <a href="http://www.popotang.cn" target="_blank">久久久不卡国产精品一区二区</a>| <a href="http://www.szdeyi.cn" target="_blank">久久精品免费一区二区</a>| <a href="http://www.meedow.cn" target="_blank">欧美一区二区精品久久</a>| <a href="http://www.y0ing.cn" target="_blank">久久天天躁夜夜躁狠狠躁2022</a>| <a href="http://www.950aw.cn" target="_blank">亚洲精品高清久久</a>| <a href="http://www.monggo.cn" target="_blank">中文字幕热久久久久久久</a>| <a href="http://www.52wysq.cn" target="_blank">精品久久人人妻人人做精品 </a>| <a href="http://www.mutian100.cn" target="_blank">亚洲欧美一区二区三区久久</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>