作者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