This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<cstdlib> | |
#include<vector> | |
using namespace std; | |
typedef vector<int> Vint; | |
int main(int argc, char* argv[]) | |
{ | |
//int i,sum=0,n; | |
//vector<int> avector; | |
//printf("請問要計算多少數字的總和"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Integrated Development Environment | |
// Visual C++ | |
#include <iostream> | |
#include <cstdlib> | |
#include "header.h" | |
using namespace std; | |
// | |
int main(int argc, char** argv) | |
{ | |
unsigned int length = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Integrated Development Environment | |
// Visual C++ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <memory.h> | |
// 總數量 | |
#define CARSIZE 5 | |
// 一輛車 | |
typedef struct SMyCar | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 設計一主程式,並呼叫一個副程式StrLen()可以算出字串a[]之字元數目。(不包括 \0) | |
主程式:(1) 輸入一個字串資料a[]。(2) 呼叫StrLen(),印出字串a[]之字元數目。 | |
副程式:StrLen(),可以算出字串a[]之字元數目,並將結果傳回主程式。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 設計一主程式,並呼叫一個副程式StrLen()可以算出字串a[]之字元數目。(不包括 \0) | |
主程式:(1) 輸入一個字串資料a[]。(2) 呼叫StrLen(),印出字串a[]之字元數目。 | |
副程式:StrLen(),可以算出字串a[]之字元數目,並將結果傳回主程式。 | |
2. 設計一主程式,並呼叫一個副程式StrCat()可以將字串a[]與b[]連接成c[]。 | |
主程式:(1) 輸入兩個字串資料a[]與b[]。(2) 呼叫StrCat (),印出a[]、b[]、c[]之內容。 | |
副程式:StrCat (),將字串a[]與b[]連接成c[],並將結果傳回主程式。 | |
3. 設計一主程式,並呼叫一個副程式StrCopy()可以將字串a[]複製成b[]。 | |
主程式:(1) 輸入一個字串資料a[]。(2) 呼叫StrCopy ()將字串a[]複製成b[],再印出a[]、b[]之內容。 | |
副程式:StrCopy (),將字串a[]複製成b[],並將結果傳回主程式。 | |
4. 設計一主程式,並呼叫一個副程式StrLeftN()可以截取字串的左側N個字元。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2. 設計一主程式,並呼叫一個副程式StrCat()可以將字串a[]與b[]連接成c[]。 | |
主程式:(1) 輸入兩個字串資料a[]與b[]。(2) 呼叫StrCat (),印出a[]、b[]、c[]之內容。 | |
副程式:StrCat (),將字串a[]與b[]連接成c[],並將結果傳回主程式。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define BUFFERSIZE 1024 | |
// | |
int main(int argc, char* argv[]) | |
{ | |
char* ptr = NULL; | |
char* pReader = NULL; | |
int i = 0, counter = 0; | |
// 動態配置記憶體 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
real | |
real | |
real | |
real | |
fake | |
fake | |
real | |
real | |
real | |
real |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @eyny@Force[TW]@ | |
#include "forcetw20101222.h" | |
// | |
CWChar::CWChar(void) | |
{ | |
this->m_wcs = NULL; | |
this->m_size = 0; | |
} | |
CWChar::CWChar(const char* str) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @eyny@Force[TW]@ | |
#include "forcetw20101224.h" | |
// | |
CBitset::CBitset(void) | |
{ | |
this->m_dec = 0; | |
this->m_bitlen = 0; | |
this->m_bitset.clear(); | |
} | |
CBitset::CBitset(unsigned int nBitLen, unsigned int nVal) |