目前分類:[講台] 上課筆記 (2)

瀏覽方式: 標題列表 簡短摘要

在 C++ 中,我們用 new 取代了 malloc 的功能:

    語法:  p_var = new typename;

Typename can be any basic data type or user-defined object (enum, class,and structincluded). If typename is of class type, the default constructor is called to construct the object.

翠西亞 發表在 痞客邦 留言(1) 人氣()

◎系統內建的資料型態(build-in data type),與使用者自行定義的資料型態(user defined data type)有什麼不同?

 ※系統內建的資料結構,如:char、int、float、double…等等。
    使用者自行定義的資料結構,如:struct、union…等等。

翠西亞 發表在 痞客邦 留言(0) 人氣()