📄 vc-c++的面试题_欢迎光临 okeyes 的业余技术研究中心.mht
字号:
From: <Saved by Windows Internet Explorer 7>
Subject: =?gb2312?B?VkMvQysrtcTD5srUzOJfu7bTrbniwdkgT2tleWVzILXE0rXT4Ly8yvXR0A==?=
=?gb2312?B?vr/W0NDE?=
Date: Fri, 27 Mar 2009 10:02:11 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0000_01C9AEC3.18DF8F90"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C9AEC3.18DF8F90
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://hi.baidu.com/okeyes888/blog/item/adbb7c4449160d44500ffee4.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--STATUS =
OK--><HTML><HEAD><TITLE>VC/C++=B5=C4=C3=E6=CA=D4=CC=E2_=BB=B6=D3=AD=B9=E2=
=C1=D9 Okeyes =
=B5=C4=D2=B5=D3=E0=BC=BC=CA=F5=D1=D0=BE=BF=D6=D0=D0=C4</TITLE>
<META http-equiv=3Dcontent-type content=3D"text/html; charset=3Dgb2312">
<STYLE type=3Dtext/css>.error {
FONT-SIZE: 12px; COLOR: #ff0000
}
</STYLE>
<SCRIPT src=3D"http://hi.baidu.com/ui/scripts/global.js"=20
type=3Dtext/javascript></SCRIPT>
<SCRIPT language=3Djavascript =
src=3D"http://hi.baidu.com/js/popup.js"></SCRIPT>
<SCRIPT=20
src=3D"http://hi.baidu.com/ui/scripts/CommentEditor/BdEditor-mined.js?v=3D=
2.3"=20
type=3Dtext/javascript></SCRIPT>
<SCRIPT language=3DJavaScript =
src=3D"http://hi.baidu.com/js/g_spjs.js"></SCRIPT>
<SCRIPT language=3Djavascript>
<!--
var allkey=3D"";
var i=3D0;
var flag=3D0;
function setpv(allnum)
{
var num =3D allnum.split('_');
document.getElementById("result").innerHTML=3Dnum[0];
}
function checkMail(s)
{
var pattern=3D/\w+@\w+\.[a-z]+/;
if(pattern.test(s))
{
return true;
}
else
{
return false;
}
}
function checkeandu(eanduid)
{
var eanduvalue=3DG(eanduid).value;
var len=3Dbytes(eanduvalue);
if(len>128)
{
=
showErr(2,"=C4=FA=CA=E4=C8=EB=B5=C4=CD=F8=D6=B7=BB=F2=D3=CA=CF=E4=CC=AB=B3=
=A4=A3=AC=C7=EB=B1=A3=B3=D6=D4=DA128=D7=D6=BD=DA=D2=D4=C4=DA=A1=A3");
return false;
}
else
{
return true;
}
}
function cmtdel(str)
{
var pop=3Dnew Popup({ =
contentType:3,isReloadOnClose:false,width:340,height:80});
pop.setContent("title","=C9=BE=B3=FD=C6=C0=C2=DB");
=
pop.setContent("confirmCon","=C4=FA=C8=B7=B6=A8=D2=AA=B3=B9=B5=D7=C9=BE=B3=
=FD=D5=E2=CC=F5=C6=C0=C2=DB=C2=F0=A3=BF");
pop.setContent("callBack",delCallback2);
pop.setContent("parameter",{fid:str,popup:pop});
pop.build();
pop.show();
return false;
}
function delCallback2(para)
{
var o_pop=3Dpara["popup"];
o_pop.config.contentType=3D1;
o_pop.setContent("contentUrl","");
o_pop.reBuild();
G(para["fid"]).target=3Do_pop.iframeIdName;
eval("document."+para["fid"]).submit();
}
String.prototype.byteLength =3D function() {
return this.replace(/[^\u0000-\u007f]/g,"\u0061\u0061").length;
}
function checkname(strid)
{
var ele=3Ddocument.getElementById(strid);
var len=3Dbytes(ele.value);
if(len>49)
{
=
showErr(1,"=C4=FA=CA=E4=C8=EB=B5=C4=D0=D5=C3=FB=CC=AB=B3=A4=A3=AC=C7=EB=B1=
=A3=B3=D6=D4=DA49=D7=D6=BD=DA=D2=D4=C4=DA=A1=A3");
return false;
}
else
{
if(len=3D=3D0)
{
document.getElementById(strid).value=3D"=C4=E4=C3=FB=CD=F8=D3=D1";
}
return true;
}
}
function checktext(textid)
{
var tempStr=3D'';
var isLightFont=3Dfalse;
if(editor&&textid=3D=3D"spBlogCmtText"){
//document.getElementById("spBlogCmtText").value=3Deditor.getHtml();
tempStr=3Deditor.getHtml();
tempStr=3DtempStr.replace(/<span =
style=3D"filter:glow\(color=3D#([0-9a-z]{3,6}),strength=3D2\);height:0px;=
color:#([0-9a-z]{3,6})">/ig,'');
tempStr=3DtempStr.replace(/<\/span>/ig,'');
document.getElementById("spBlogCmtText").value=3DtempStr;
isLightFont=3D!(tempStr=3D=3Deditor.getHtml());
}
document.getElementById(textid).value=3Dtrimlr(textid);
var str=3Dtrimrn(textid);
len=3Dstr.length;
if(len=3D=3D0 || ((/^[\s,=A1=A1]+$/gi).test(str)) )
{
=
showErr(3,"=C4=FA=B1=D8=D0=EB=CA=E4=C8=EB=C6=C0=C2=DB=C4=DA=C8=DD=A3=AC=C7=
=EB=BC=EC=B2=E9=A1=A3");
return false;
}
else
{
len=3Dstr.byteLength();
var maxLength=3DisLightFont?916:1000;
if(len > maxLength)
{
=
showErr(3,"=C4=FA=CA=E4=C8=EB=B5=C4=C6=C0=C2=DB=C4=DA=C8=DD=CC=AB=B3=A4=A3=
=AC=C7=EB=B1=A3=B3=D6=D4=DA500=D7=D6=D2=D4=C4=DA=A1=A3");
return false;
}
if(editor&&textid=3D=3D"spBlogCmtText"){
document.getElementById("spBlogCmtText").value=3Deditor.getHtml();
document.getElementById(textid).value=3Dtrimlr(textid);
}
return true;
}
}
function showErr(index,str)
{
G(index+"_err").style.display=3D"";
G(index+"_err_con").innerHTML=3Dstr;
}
function hidErr(index)
{
G(index+"_err").style.display=3D"none";
G(index+"_err_con").innerHTML=3D"";
}
function alertPop(tit,con)
{
var pop=3Dnew Popup({ =
contentType:4,isReloadOnClose:false,width:340,height:80});
pop.setContent("title",tit);
pop.setContent("alertCon",con);
pop.build();
pop.show();
}
function cmtfull()
{
var cnum=3D0;
if(cnum>=3D50000)
{
=
alertPop("=B7=A2=B1=ED=C6=C0=C2=DB","=B5=A5=C6=AA=C8=D5=D6=BE=C6=C0=C2=DB=
=CA=FD=D7=EE=B6=E0=CE=AA50000=CC=F5.");
return false;
}
else
{
return true;
}
}
function checkcmtform()
{
=
if(checkname("spBlogCmtor")&&checkeandu("spBlogCmtURL")&&checktext("spBlo=
gCmtText")&&cmtfull())
{
submitForm();
return true;
}
else
{
return false;
}
}
var g_pop=3Dnull;
function submitForm()
{
g_pop=3Dnew Popup({ =
contentType:1,isReloadOnClose:false,width:340,height:80});
g_pop.setContent("title","=CC=ED=BC=D3=C6=C0=C2=DB");
g_pop.setContent("contentUrl","");
g_pop.setContent("someDisabledBtn","btn_ok");
g_pop.build();
G("popFormSubmit").target=3Dg_pop.iframeIdName;
g_pop.show();
}
function g_close_pop()
{
g_pop.close();
}
function formatonlinpic()
{
var picobj=3Ddocument.getElementsByName("onlinepic");
var picnum=3Dpicobj.length;
for(var i=3D0;i<picnum;i++)
{
if(picobj[i].width>200)
{
picobj[i].width=3D200;
}
if(picobj[i].height>200)
{
picobj[i].height=3D200;
}
}
try{document.getElementById("btn_ok").disabled =3D "";}catch(e){}
}
function addToFavor(){
var blogTitle=3D'VC/C++=B5=C4=C3=E6=CA=D4=CC=E2'.replace(/'/g,'\'');
window.open('http://cang.baidu.com/do/add?it=3D'+encodeURIComponent(blogT=
itle+'_=B0=D9=B6=C8=BF=D5=BC=E4')+'&iu=3D'+encodeURIComponent(location.hr=
ef)+'&fr=3Dsp#nw=3D1','_s','scrollbars=3Dno,width=3D600,height=3D450,righ=
t=3D75,top=3D20,status=3Dno,resizable=3Dyes');
return false;
}
var isIE =3D /*@cc_on!@*/false;
function tracker(did,a){
return function(){
var t=3Dnew Date().getTime();
var href=3Da.href;
if(isIE){
var r =3D /href\s*=3D\s*("|')?([^\s]*)\1/gi;
if(r.test(a.outerHTML))
href =3D RegExp.$2;
}
new Image().src =3D "http://hi.baidu.com/sys/statlog/1.gif?m=3D" =
+ did + "&v=3D" + encodeURIComponent(href) + "&c=3D" + =
encodeURIComponent(location.href) + "&t=3D"+t;
}
}
function tracker_init(did){
var _s=3Ddocument.getElementById(did);
var as =3D _s.getElementsByTagName('A');
for(var i =3D 0, j =3D as.length; i < j; i ++){
var a =3D as[i];
if(isIE){
a.attachEvent("onclick", tracker(did,a));
}else{
a.addEventListener("click", tracker(did,a), false);
}
}
}
/* some functions for cmt-reply */
function cmtreply(cmtName,cmtPorID)
{
window.location.hash=3D"#send";
var cmtForm=3Ddocument.form1;
cmtForm.cm.value=3D"3";
if(!cmtForm.spReferTarget)
{
var ipt=3Ddocument.createElement("input");
ipt.type=3D"hidden";
ipt.name=3D"spReferTarget";
ipt.value=3DcmtPorID;
cmtForm.appendChild(ipt);
}else cmtForm.spReferTarget.value=3DcmtPorID;
//G("reTitle").innerHTML=3D"=BB=D8=B8=B4"+cmtName+"=A3=BA";
G("cancleReLink").style.display=3D"";
cmtForm.btn_ok.value=3D"=BB=D8=B8=B4=C6=C0=C2=DB";
try{
editor.window.focus();
=
editor.window.document.body.innerHTML=3D"=BB=D8=B8=B4"+cmtName+"=A3=BA";
var w =3D editor.window;
if(w.getSelection){
var d =3D w.document;
var s =3D w.getSelection();
var r =3D d.createRange();
r.setStartAfter(d.body.firstChild);
r.setEndAfter(d.body.lastChild);
s.removeAllRanges();
s.addRange(r);
}
}catch(e){
try{
cmtForm.getElementsByTagName("textarea")[0].focus();
=
cmtForm.getElementsByTagName("textarea")[0].value=3D"=BB=D8=B8=B4"+cmtNam=
e+"=A3=BA";
}catch(e){}
}
}
function canclereply()
{
var cmtForm=3Ddocument.form1;
cmtForm.cm.value=3D"1";
try{cmtForm.removeChild(cmtForm.spReferTarget);}catch(e){}
/*
try{
var cmt=3DcmtForm.getElementsByTagName("textarea")[0]
cmt.value=3D"";
cmt.focus();
}catch(e){}
*/
try{
var ed=3Deditor.window.document.body;
ed.innerHTML=3D"";
editor.window.focus();
}catch(e){
var cmt=3DcmtForm.getElementsByTagName("textarea")[0];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -