{"rsdb":{"rid":"239779","subhead":"","postdate":"0","aid":"165221","fid":"54","uid":"1","topic":"1","content":"

1.\u51c6\u5907\u5de5\u4f5c<\/p>

\u9996\u5148\u8fdb\u5165root\u7528\u6237\u6a21\u5f0f\uff0c\u4e0d\u7136\u4e0d\u80fd\u4fdd\u5b58.c \u6587\u4ef6<\/p>

1.1 \u6253\u5f00\u7ec8\u7aef\uff1a\u4f7f\u7528\u5feb\u6377\u952e Ctrl + Alt + T\uff1b<\/p>

1.2 \u5b89\u88c5vim\uff1a\u8f93\u5165 sudo apt-get install vim\uff1b\uff08\u6ca1\u5b89\u88c5\u7684\u8bdd\u597d\u50cf\u63d2\u5165\u6a21\u5f0f\u4e2d \u4e0a\u4e0b\u5de6\u53f3 \u548c\u5176\u4ed6\u4e8b\u4e0d\u7075\u7684\uff09<\/p>

1.3 \u5b89\u88c5gcc\uff1a\u8f93\u5165 sudo apt-get install g++\u3002<\/p>

2.\u7f16\u5199\uff0c\u7f16\u8bd1\uff0c\u8fd0\u884c<\/p>

2.1\uff1a\u6253\u5f00\u7ec8\u7aef\uff0c\u968f\u4fbf\u8fdb\u5165\u4e00\u4e2a\u6587\u4ef6\u5939\u7528\u4e8e\u5b58\u653e\u4f60\u7f16\u5199\u7684\u7a0b\u5e8f<\/p>

#vi hello.c<\/p>

\u63a5\u7740\u4f60\u5c31\u4f1a\u770b\u5230vi\u7f16\u8f91\u5668\uff0c\u6309i\u5f00\u59cb\u8f93\u5165\uff08\u8f93\u5165i\u540e\u4e0d\u9700\u8981\u56de\u8f66\uff09\uff0c\u63a5\u7740\u76f4\u63a5\u8f93\u5165\u4f60\u7684\u4ee3\u7801\uff0c(\u5982\u679c\u4f60\u4e0d\u4f1a\u7528VIM \u53ef\u4ee5\u81ea\u5df1\u53bb\u5148\u4e86\u89e3\u4e00\u54c8\uff0c\u73b0\u5728\u6211\u5176\u5b9e\u4e5f\u4e0d\u592a\u61c2VIM\u7684\u8be6\u7ec6\u64cd\u4f5c)<\/p>

\u8f93\u5b8c\u540e\u6309Esc\uff0c\u518d\u8f93\u5165":wq"\uff08\u5f15\u53f7\u5185\uff09\u4fdd\u5b58\u9000\u51fa\uff0c<\/p>

2.2\uff1a\u7528gcc\u7f16\u8bd1\u4f60\u7684\u7a0b\u5e8f<\/p>

\u5728\u7ec8\u7aef\u8f93\u5165<\/p>

#sudo gcc -Wall hello.c -o hello<\/p>

\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u5728\u4f60\u7684\u6587\u4ef6\u4e2d\u51fa\u73b0\u4e00\u4e2ahello\u8fd0\u884c\u6587\u4ef6\u3002<\/p>

2.3\uff1a\u8fd0\u884c\u7f16\u8bd1\u597d\u5230Hello\uff08\u6ce8\u610f\u5927\u5c0f\u5199\uff09\u6587\u4ef6\uff0c\u5728\u7ec8\u7aef\u8f93\u5165<\/p>

#.\/Hello<\/p>

\"\"<\/p>

\"\"<\/p>

\u8fd0\u884c.cpp\u6587\u4ef6\u5219\u9700\u8981\u5b89\u88c5g++<\/strong><\/p>

\u5b89\u88c5g++<\/p>

sudo apt-get install g++<\/p>

vi hello.cpp<\/p>

g++ -o hello hello.cpp<\/p>

.\/hello<\/p>","orderid":"0","title":"Ubuntu\u4e0b\u7ec8\u7aefVim\u7f16\u5199C\u8bed\u8a00\u7a0b\u5e8f","smalltitle":"","mid":"0","fname":"linux\u7f16\u7a0b\u57fa\u7840","special_id":"0","bak_id":"0","info":"0","hits":"10239","pages":"1","comments":"0","posttime":"2017-10-18 09:07:55","list":"1508288875","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Ubuntu<\/A> \u7ec8\u7aef<\/A> Vim<\/A> \u7f16\u5199<\/A> \u8bed\u8a00\u7a0b\u5e8f<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"113.108.110.181","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"Ubuntu\u4e0b\u7ec8\u7aefVim\u7f16\u5199C\u8bed\u8a00\u7a0b\u5e8f","lastview":"1709244182","digg_num":"2260","digg_time":"1711789747","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}