有沒有『版主也要來寫軟體』的八卦?

瀏覽: 1922
回覆: 2
共1頁
發文數:3243
發表時間:2011-03-25 14:19:00
還早得很(笑)

不過倒是弄出了點有趣的東西,用非常簡單的C語言
安裝Nokia的SDK真的會出人命...

軟體名稱:你好!5800!
版本:1.00(0)(我還不知道要怎麼改這個)
功能:印出文字(而已)
截圖:(沒有猜錯,不支援顯示中文,所以會亂碼)

(以下是電腦用相同程式碼跑出來的結果)




程式語言:
原始碼:
//--------------前置處理器選項(Preprocessor Code)--------------
// This is a GCCE toolchain workaround needed when compiling with GCCE
// and using main() entry point

#ifdef __GCCE__
#include <staticlibinit_gcce.h>
#endif

//standard input/output library
//版本:1.00(0)

#include <stdio.h> //for printf(), scanf(), fgetc()

//Standard Input / Output Streams Library(C++)
//版本:1.00(0)

//#include <iostream>

//C Standard General Utilities Library
//版本:1.00(5)

#include <stdlib.h>
//or in C++
//#include <cstdlib>

//--------------環境設定(Enviroment Settings)--------------
//是否顯示偵錯數據(0為否)?

#define SHOW_DEBUG_MESSAGE 0

//編譯OS種類
#define SYSTEM_CATAGORY 2//Windows console = 0, Linux console = 1, Symbian console = 2

//--------------全域宣告與定義(Global Declaration & Definition)--------------
////////Global Structures////////

////////全域變數(global variables)////////

////////函式原型(function prototypes)////////

//function prototype for 暫停運行函式
short int main_pause_program(void);

//--------------主要程式碼(Main Code)--------------
//using namespaces in C++ standard library "iostream"
//版本:1.00(0)
//using namespace std;


//main函式
//版本:1.00(13)
//程式的運行從main函數開始

int main(void)
{
//宣告與定義(Declaration & Definition)

//---------------------

restart_program:
//test
printf("Hello! 5800!\n");
printf("This is an Open C program runs on you.\n");
printf("Enter N and Enter to exit the program!\n");


//暫停函式
if(main_pause_program() == 1)
{
goto restart_program;
}
else
{
return 0;
}
////暫停函式
//---------------------
//傳回數字0(表程式運行成功)
//版本:1.00(1)
//return後面不可加註解!

return 0;
}
//-----------------------------------------
//暫停運行函式
//版本:1.20(1)

short int main_pause_program(void)
{
//make a line
printf("\n---------------------------------\n");
//prompt A
printf("顯示運行結果,程式暫停運行\nDisplaying Execution Result\n");
printf("請問您要重新運行本程式嗎(Y/N)?\nDo you want to execute this program again(Y/N)?");
//get action
//get char

{
unsigned short int inputChar;
//make sure input right
while(!((inputChar = getchar()) == 'y' || inputChar == 'Y'
|| inputChar == 'n' || inputChar == 'N'));
if(inputChar == 'y' || inputChar == 'Y')
{
//丟掉換行符號
scanf("%*c");
//clean moniter
if(SYSTEM_CATAGORY == 0)
{
system("cls");
}
else
{
system("clear");
}
//return true
return 1;
}
}
////get char
//return false

return 0;
}



pika1021 於 3/25/2011 7:04:53 AM 修改文章內容

V字龍(Vdragon) 於 2015-05-25 08:59:23 修改文章內容


商業贊助
發文數:1
發表時間:2025-10-09 03:11:50
發文數:3243
發表時間:2011-03-27 06:35:00
引用『V字龍』所述:
還早得很(笑)不過倒是弄出了點有趣的東西,用非常簡單的C語言安裝Nokia的SDK真的會出人命...軟體名稱:你好!5800!版本:1.00(0)(我還不知道要怎麼改這個)功能:印出文字(而已)截圖:(沒有猜錯,不支援顯示中文,所以會亂碼)(以下是電腦用相同程式碼跑出來的結果)程式語言:C原始碼://--------------前置處理器選項(Preprocessor Code)---------..........恕刪
自己頂

V字龍(Vdragon) 於 2011-03-27 06:35:00 修改文章內容


共1頁