摘要:
local a = 1local b = ","local c = 2local str = tostring(a)..tostring(b)..tostring(c)print(str)1,2 阅读全文
摘要:
mysql_fetch_row是用来获取数组记录中每个字段的值mysql_num_rows是用来判断数组中一共有多少条记录判断数组是否为空时用mysql_num_rows比较,mysql_fetch_rows可能会出现覆盖记录 阅读全文
摘要:
#include<stdio.h>struct student{ int num; char name[20]; float score1,score2,sum,average; };void main(){ struct student stu[5]; int i; for(i=0;i<5;i++) { printf("请依次输入第%d个学生的学号,姓名,和两门成绩:",i+1); scanf("%d%s%f%f",&stu[i].num,stu[i].name,&stu[i].score1,&stu[i].s 阅读全文
摘要:
结构体数组 #includestruct student{ int num; char name[20]; float score1,score2,sum,average; };void main(){ struct student stu[5]; ... 阅读全文
摘要:
string to inttonumberprint(tonumber("1234")) 阅读全文
摘要:
svn resolved 冲突路径 阅读全文
摘要:
function FGUtilStringSplit(str,split_char) ------------------------------------------------------- -- 参数:待分割的字符串,分割字符 -- 返回:子串表.(含有空串) local sub_str_tab = {}; while (true) do local pos = string.find(str, split_char); if (not pos) then sub_str_tab[#sub_str_tab + 1] = str; break; end local sub... 阅读全文
摘要:
#include<map>#include<iostream>#include <string>using namespace std;int main(){ map<int,map<int,string> >multiMap; //对于这样的map嵌套定义, map<int, string> temp; //定义一个map<int, string>变量,对其定义后在插入multiMap temp[90] = "hi"; temp[100] = "maxi"; multi 阅读全文
摘要:
C++代码void CProject1Dlg::OnBnClickedButton2(){ // 打开换为 luaL_newstate lua_State *L = luaL_newstate() ; /* 打开 Lua */ luaL_openlibs(L); /* 加载 .lib 文件 */ // 加载脚本文件,需要放在程序目录 luaL_loadfile( L, "test.lua" ); lua_resume( L, 0 , 0); typedef struct { int a; CString strTest; struct test { int b; }c; } 阅读全文
摘要:
int to char* and char* to int//方法一(inttochar*)inti=5;charnum[16];memset(num,'\0',sizeof(num));sprintf(num,"%d",i)printf("%s",num);//5//方法二(inttochar*)//#include<stdlib.h>num[0]='\0';itoa(i,num,10);//按十进制转换inttochar*printf("%s",num);//5i=0;i=atoi(st 阅读全文