文章詳目資料

亞東學報

  • 加入收藏
  • 下載文章
篇名 使用C與C++以檢驗陣列註標越界之比較
卷期 30
並列篇名 Comparison between C and C++ in Examining the Data Range for the Indexes of the Array Variables
作者 許金童
頁次 075-080
關鍵字 陣列變數註標越界物件導向類別array variableindexoverloadingobject-oriented programmingclass
出刊日期 201012

中文摘要

本文探討有關電腦基礎課程的計算機程式之教學中,使用C/C++語言來宣告陣列變數時,由於各種版本之C/C++編譯程式,都未對陣列變數的註標值,進行資料範圍的檢驗[1][2],因此程式設計者必須自行撰寫註標值之範圍檢驗的段落敘述,以防止註標值越界所造成的邏輯錯誤,C++包含了C的大部份功能,而且又發展了不少新的指令使用法,本文擬將檢驗註標值範圍的程式設計方法,做C與C++之比較,最後並使用物件導向技術,處理這個問題。

英文摘要

This article discusses something about computer programming. None of the versions of C/C++ compilers has the functions to examine the data range for the indexes of the array variables. Therefore, when programmers declare the array variables in C/C++, they have to program some paragraphs about examining the data range so as to prevent the logic errors in overloading of the indexes. C++ includes C in most of functions, and has been developed many new commands. This article intends to compare C with C++ in examining the data range for the indexes of the array variables, and finally, use the object-oriented programming technique to deal with the above mentioned problems.

本卷期文章目次

相關文獻