C++與演算法

文字處理 - 字元與字串

電腦萬物皆文字

純文字是電腦裡極重要的表達方式。

  • 網址是純文字 http://al.orangeapple.tw

  • 檔名是純文字 hello.cpp

  • 檔案路徑是純文字 C:\Program Files (x86)\Mozilla Firefox\firefox.exe

  • 網頁原始碼是純文字

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
  • C++程式碼也是純文字
#include<iostream>
using namespace std;

int main()
{
    return 0;
}

要掌握電腦的根本,就要學會操作文字



試試看

用純文字編輯器(記事本notepad++gedit)開啟各種檔案,能看到什麼?