作者ric2k1 (Ric)
看板EE_DSnP
標題Re: [問題] If at bottom
時間Thu Oct 15 22:12:26 2009
: 在作業二 cmdPaser.cpp 中
: moveToHistory 前面的註解寫
:
: 2. If at bottom,
:
: 我對這個判斷句有疑問。
: 因為 linux 所有的歷史記錄只要修改過,都會被保留下來,就連前面的空白。
: 也會被保留下來
:
: 例如說:原本的記錄是這樣的
: #1:>ls -al
: #2:>ssh ccws3.ee.ntu.edu.tw
:
: 這時候我按↑回到 #1,然後在 ls 的前面加很多空白,
: 變成這樣
:
: #1:> ls -al
:
: 之後按↓,再按↑回到 #1,
: 前面的空白還是被保留下來了。
:
: 所以應該是所有的 buffer 在 temperary 記錄下來時,都不會除去空白。
我的不會耶... 我還是會變回:
#1:>ls -al
所以就一致用我的定義, 可以嗎?
:
: --
:
※ 發信站: 批踢踢實業坊(ptt.cc)
: ◆ From: 140.112.4.235
: → herbert570:另外教授,strcpy沒有宣告,除了include<string>外 10/15 21:05
: → herbert570:還要多include <string.h>....我覺得怪怪的! 10/15 21:06
: → herbert570:有 <string.h>,就會有宣告了。不知道是不是compiler的 10/15 21:07
: → herbert570:問題。 10/15 21:07
<string> 是 C++ 的 header file, 會 include "string" 相關的 classes.
而 <string.h> 在 C++ 等於 <cstring> (recommended), 是去 include
C 的一些 string functions, 像是 strcpy, strlen, etc
: 推 cmh317:遇到跟樓上一樣的問題... 10/15 21:57
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.224.46.5
1F:推 herbert570:當然ok囉~ 10/16 00:25
2F:推 bnsblue:前年有說過"歷史是不容修改的" XD 10/16 09:31