
c4droid代碼手冊里面包含了用戶常用的所有代碼內容,并且以大全的形式進行展現,還有諸多實戰項目的源碼可以觀看學習,可離線閱讀其中的內容,還有部分內容托管到了github上,對于剛剛接觸c4droid這款軟件的用戶而言,可以快速度過學習期,成為一名合格的c++軟件開發者。
軟件功能
內含很多c/c++代碼。
代碼均在c4droid gcc/g++編譯器編譯通過。
c4droid代碼手冊收錄大量代碼實例,幫你擺脫平臺帶來的困惑!...
注意事項
c4droid是手機c/c++編程神器,但是有的代碼略有差異。
常見問題
1.為什么連最簡單的helloworld都不能編譯?
/*試試這個*/#include<stdio.h> int main() { printf("hello world"); return 0; }
2.不能編譯C++?
試試這個*/# include< iostream> usingnamespace std; int main(( cout<< helloworld", return 0: 1
3.沒有 windows. h頭文件?
這里是手機,只支持c語言標準庫頭文件。不過像 sleep; systen0函數有其它頭文件
4.能進行文件操作嗎?路徑是什么?
#include<stdio. h> int main(( FILE*fp; charch=c4 droid教程";fp= fopen(/ sdcard/c4droid. txt W+): fputs(ch, fp); fclose(fp);printf已寫入文件"); return0
實例代碼
// Rand 3
//10的poa次方
int poww(int poa)
{
int poi, gett = 1;
if (poa == 0)
return 1;
for (poi = 1; poi <= poa; poi++)
{
gett = 10 * gett;
}
return gett;
}
//字符串轉數字
int cton(char snum[])
{
int rnnum, arrr;
char snumm[] = "0123456789";
int ctoni, ctonii;
for (ctoni = 0; ctoni <= strlen(snum) - 1; ctoni++)
for (ctonii = 0; ctonii <= strlen(snumm) - 1; ctonii++)
{
if (snum[ctoni] == snumm[ctonii])
{
arrr = ctonii * poww(strlen(snum) - ctoni - 1);
rnnum += arrr;
}
}
return rnnum;
}
//隨機數表(外部函數可修改)
char randf[] =
"4685680458221184544233546745840946997782821802983845272444424956688465640137820349283465268154379264386928649572168296084328560286273427586222857645183495462134797565562581885645872594696424824646461558359255465256558828570804621358809810422543892828456825183498848994077531827428";
int isntfirst, nowh;
//隨機函數
int randd(int min, int max)
{
char wait3[10];
srand((int)time(NULL));
int nowhh = rand() % strlen(randf) + 1;
if (!isntfirst)
{
no
特別說明
軟件信息
- 包名:cn.atd3.ccode
- MD5:ED2E2AA6B9FBDA9A001F4AB5CFAE73CF