目前分類:C++ (34)

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

default constructor分拆檔案特殊功能,class可以客製化初始資料

Input:

Kuihao 發表在 痞客邦 留言(0) 人氣()

cout-setfill-setw的函式庫:iomanip

try-threw-catch的函式庫:exception、stdexcept

Kuihao 發表在 痞客邦 留言(0) 人氣()

製作一個class,擁有兩個功能1、輸入合理成績 2 計算並輸出平均

Input:

Kuihao 發表在 痞客邦 留言(0) 人氣()

超棒的Tutorialspoint

https://www.tutorialspoint.com/index.htm

Kuihao 發表在 痞客邦 留言(0) 人氣()

用相同的函數名稱,但是存取的型態不同或是存取不同個數的變數,C++會自動判斷要套入哪個函數。

這就叫做overload,在Java有提到過。

Kuihao 發表在 痞客邦 留言(0) 人氣()

static的功能是使變數能一直存在,記憶體空間可以一直存留,直到程式結束。

同時若沒有指定出值,static會自動初始歸零。

Kuihao 發表在 痞客邦 留言(0) 人氣()

有隻可愛的蝸牛沒事做,想說來挑戰爬高高。

蝸牛開始位置在0,牠想爬上高度為100的樹;牠早上會往上爬5,晚上睡覺時會下滑2。

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include "Sort_class03.mf.c"

int main()

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include"Sort_class03.def"

    Sort_class::Sort_class(int a1,int a2,int a3)

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
using namespace std;

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include<limits.h>

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include<limits.h>

Kuihao 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include <string.h>

Kuihao 發表在 痞客邦 留言(0) 人氣()

一瞬間就變成C++了呢

上學期開始學C和資料結構真是有夠嗆的,連更新網誌都沒時間,看來這學期也差不多,有空就打打東西囉。

Kuihao 發表在 痞客邦 留言(0) 人氣()

«12