1 / 9

C++ 研究 ~ 0 からの C++ ~

C++ 研究 ~ 0 からの C++ ~. 北海道情報大学 情報メディア学部 情報メディア学科 新井山ゼミ 0521602  佐藤 翼. 前回までの成果. プログラム製作 文字列検索プログラム. 今回までの進捗状況. プログラム製作 連結リスト構造 ( ノードクラス ) vector 、 list に続く第 3 のコンテナ. 製作したプログラム. 正数を入力し、出力するプログラム 数字を入力 終了条件を満たすと入力した数字全てを出力. START. 数字を入力. 0 以下. 入力した全て の数字を出力. END. イメージ図 1. 片方向リスト.

Download Presentation

C++ 研究 ~ 0 からの C++ ~

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C++研究 ~0からのC++~ 北海道情報大学 情報メディア学部 情報メディア学科 新井山ゼミ 0521602 佐藤 翼

  2. 前回までの成果 • プログラム製作 • 文字列検索プログラム

  3. 今回までの進捗状況 • プログラム製作 • 連結リスト構造(ノードクラス) • vector、listに続く第3のコンテナ

  4. 製作したプログラム • 正数を入力し、出力するプログラム • 数字を入力 • 終了条件を満たすと入力した数字全てを出力 START 数字を入力 0以下 入力した全て の数字を出力 END

  5. イメージ図1 • 片方向リスト 1532 アドレス 135 245 4238 456 123 789 データ 4238 245 1532 0 ポインタ

  6. イメージ図2 • 循環リスト • 双方向リスト 1532 アドレス 135 245 4238 456 109 123 789 データ 4238 245 1532 135 ポインタ 1532 0 254 4238 前ポインタ 456 109 123 789 データ 4238 245 1532 0 後ポインタ

  7. 考察 • 連結リスト構造 • 検索の高速化 • 1度検索して見つかったノードをリストの先頭に移動させる方式など • メモリ確保 • 配列:領域をまとめて確保 • 連結リスト:ランダムに確保 • 要素の挿入や削除の簡略化

  8. 今後の課題 • 継続したプログラム開発

  9. 次回までの成果誓約 • プログラム製作 • 2007年12月11日に発表した検索プログラムをリスト構造を利用して再構築

More Related