﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Renovatio</title><link>http://www.cppblog.com/win2cs/</link><description /><language>zh-cn</language><lastBuildDate>Tue, 14 Apr 2026 23:06:14 GMT</lastBuildDate><pubDate>Tue, 14 Apr 2026 23:06:14 GMT</pubDate><ttl>60</ttl><item><title>bash常用快捷键备忘</title><link>http://www.cppblog.com/win2cs/archive/2009/04/06/79120.html</link><dc:creator>win2cs</dc:creator><author>win2cs</author><pubDate>Mon, 06 Apr 2009 13:49:00 GMT</pubDate><guid>http://www.cppblog.com/win2cs/archive/2009/04/06/79120.html</guid><wfw:comment>http://www.cppblog.com/win2cs/comments/79120.html</wfw:comment><comments>http://www.cppblog.com/win2cs/archive/2009/04/06/79120.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/win2cs/comments/commentRss/79120.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/win2cs/services/trackbacks/79120.html</trackback:ping><description><![CDATA[<span class="fullpost">摘自http://linuxhelp.blogspot.com/2005/08/bash-shell-shortcuts.html<br>____________<span style="color: #000099; font-size: 130%;"><span style="font-family: courier new;">CTRL</span>  Key Bound</span>_____________<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Ctrl + a</span>         - Jump to the start of the line<br><span style="font-weight: bold; font-family: courier new;">Ctrl + b</span>         - Move back a char<br><span style="font-weight: bold; font-family: courier new;">Ctrl + c</span>         - Terminate the command<br><span style="font-weight: bold; font-family: courier new;">Ctrl + d</span>         - Delete from under the cursor<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Ctrl + e</span>         - Jump to the end of the line<br><span style="font-weight: bold; font-family: courier new;">Ctrl + f</span>         - Move forward a char<br><span style="font-weight: bold; font-family: courier new;">Ctrl + k</span>         - Delete to EOL<br><span style="font-weight: bold; font-family: courier new;">Ctrl + l</span>         - Clear the screen<br><span style="font-weight: bold; font-family: courier new;">Ctrl + r</span>         - Search the history backwards<br><span style="font-weight: bold; font-family: courier new;">Ctrl + R</span>         - Search the history backwards with multi occurrence<br><span style="font-weight: bold; font-family: courier new;">Ctrl + u</span>         - Delete backward from cursor<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Ctrl + xx</span>       - Move between EOL and current cursor position<br><span style="font-weight: bold; font-family: courier new;">Ctrl + x @</span>        - Show possible <span style="font-family: courier new;">hostname</span> completions<br><span style="font-weight: bold; font-family: courier new;">Ctrl + z</span>        - Suspend/ Stop the command<br>____________<span style="color: #000099; font-size: 130%;"><span style="font-family: courier new;">ALT</span>  Key Bound</span>___________<br><span style="font-weight: bold; font-family: courier new;">Alt + &lt;</span>        - Move to the first line in the history<br><span style="font-weight: bold; font-family: courier new;">Alt + &gt;</span>        - Move to the last line in the history<br><span style="font-weight: bold; font-family: courier new;">Alt + ?</span>        - Show current completion list<br><span style="font-weight: bold; font-family: courier new;">Alt + *</span>        - Insert all possible completions<br><span style="font-weight: bold; font-family: courier new;">Alt + /</span>       - Attempt to complete filename<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + .</span>       - Yank last argument to previous command<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + b</span>        - Move backward<br><span style="font-weight: bold; font-family: courier new;">Alt + c</span>       - Capitalize the word<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + d</span>       - Delete word<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + f</span>       - Move forward<br><span style="font-weight: bold; font-family: courier new;">Alt + l</span>       - Make word lowercase<br><span style="font-weight: bold; font-family: courier new;">Alt + n</span>       - Search the history forwards non-incremental<br><span style="font-weight: bold; font-family: courier new;">Alt + p</span>       - Search the history backwards non-incremental<br><span style="font-weight: bold; font-family: courier new;">Alt + r</span>       - Recall command<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + t</span>       - Move words around<br><span style="font-weight: bold; font-family: courier new;">Alt + u</span>       - Make word uppercase<br><span style="font-weight: bold; font-family: courier new; background-color: yellow;">Alt + back-space</span>       - Delete backward from cursor<br><br>高亮的是觉的有用但之前不太熟悉的<br><span style="font-family: courier new;"></span></span> <img src ="http://www.cppblog.com/win2cs/aggbug/79120.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/win2cs/" target="_blank">win2cs</a> 2009-04-06 21:49 <a href="http://www.cppblog.com/win2cs/archive/2009/04/06/79120.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++中动态分配与释放多维数组</title><link>http://www.cppblog.com/win2cs/archive/2008/12/06/68739.html</link><dc:creator>win2cs</dc:creator><author>win2cs</author><pubDate>Sat, 06 Dec 2008 13:53:00 GMT</pubDate><guid>http://www.cppblog.com/win2cs/archive/2008/12/06/68739.html</guid><wfw:comment>http://www.cppblog.com/win2cs/comments/68739.html</wfw:comment><comments>http://www.cppblog.com/win2cs/archive/2008/12/06/68739.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/win2cs/comments/commentRss/68739.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/win2cs/services/trackbacks/68739.html</trackback:ping><description><![CDATA[<p style="margin: 0in; font-size: 10pt;"><span style="font-family: simsun;" lang="zh-CN">以三维数组(N*N*N)为例<br></span></p>
<p style="margin: 0in; font-size: 10pt;"><span style="font-family: simsun;" lang="zh-CN">方法</span><span style="font-family: calibri;" lang="en-US">1:</span></p>
<p style="margin: 0in; font-family: 宋体; font-size: 10pt;" lang="en-US">分配<br></p>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;(</span><span style="color: #000000;">*</span><span style="color: #000000;">a)[N][N]&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">new</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;[N][N][N];</span></div>
<p style="margin: 0in; font-family: 宋体; font-size: 10pt;">释放</p>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">delete&nbsp;[]&nbsp;a;<br>a&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;NULL;</span></div>
<p style="margin: 0in; font-size: 10pt;"><span style="font-family: 宋体;" lang="zh-CN"><br></span></p>
<p style="margin: 0in; font-size: 10pt;"><span style="font-family: 宋体;" lang="zh-CN">方法</span><span style="font-family: calibri;" lang="en-US">2:</span></p>
<p style="margin: 0in; font-family: 宋体; font-size: 10pt;">分配</p>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">***</span><span style="color: #000000;">&nbsp;a&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">new</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">**</span><span style="color: #000000;">&nbsp;[N];<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;i&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;i&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;N;&nbsp;</span><span style="color: #000000;">++</span><span style="color: #000000;">i){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a[i]&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">new</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">*</span><span style="color: #000000;">&nbsp;[N];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;j&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;j&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;N;&nbsp;</span><span style="color: #000000;">++</span><span style="color: #000000;">j)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a[i][j]&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">new</span><span style="color: #000000;">&nbsp;</span><span style="color: #0000ff;">int</span><span style="color: #000000;">[N];<br>&nbsp;&nbsp;&nbsp;&nbsp;}</span></div>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt;">释放</p>
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;i&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;i&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;N;&nbsp;</span><span style="color: #000000;">++</span><span style="color: #000000;">i){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000ff;">for</span><span style="color: #000000;">(</span><span style="color: #0000ff;">int</span><span style="color: #000000;">&nbsp;j&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;</span><span style="color: #000000;">0</span><span style="color: #000000;">;&nbsp;j&nbsp;</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">&nbsp;N;&nbsp;</span><span style="color: #000000;">++</span><span style="color: #000000;">j)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delete&nbsp;[]&nbsp;(a[i][j]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delete&nbsp;[]a[i];<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;delete&nbsp;[]&nbsp;a;<br>&nbsp;&nbsp;a&nbsp;</span><span style="color: #000000;">=</span><span style="color: #000000;">&nbsp;NULL;<br></span></div>
<br><span style="font-family: 宋体; font-size: 12pt;">效率:实验表明方法1较方法2快，原因大概是new operator的调用开销大，且其开销以调用次数为主要衡量标准</span><br>   <img src ="http://www.cppblog.com/win2cs/aggbug/68739.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/win2cs/" target="_blank">win2cs</a> 2008-12-06 21:53 <a href="http://www.cppblog.com/win2cs/archive/2008/12/06/68739.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>