struct bRegAccount
{
int Number;
TCHAR ID[30];
TCHAR PassWord[30];
TCHAR PassWordOK[30];
TCHAR TwoPassWord[30];
public:
bRegAccount() //问一下假如创建对象是不是直接走这个构造函数直接初始化?
{
Number = 0……继续阅读 »
9年前 (2016-04-16) 1422浏览
0个赞
#include<stdio.h>
void zhuanzhi(int array[][3])
{
int t,i,j;
for(i=0;i<3;i++)
for(j=0;j<3;j++)
{t=array[i][j];
array[i][j]=array[j][i];
array[j][i]=t;
}
}
void main()
……继续阅读 »
9年前 (2016-04-16) 980浏览
0个赞
#include<stdio.h>
int *test(int a);
int main()
{
int *p;
int a;
p=test(3);
a=*p;
a=*p;
a=*p;
a=*p;
printf("%d\n",*p);
printf("%d\n",*p);
return 0;
}
int *test(int ……继续阅读 »
9年前 (2016-04-16) 1302浏览
0个赞
本人现在有几条信息:
MAC
TIME
MARK
SSID
都是 unsigned char型
现在需要将他们合并成(”MAC”,”TIME”,”MARK”,”SSID”)–每个字段加单引号,用逗号隔开,最外加上括号应该怎么写。
解决方案
40
spr……继续阅读 »
9年前 (2016-04-16) 1589浏览
0个赞
LINFO << “My name is ” << MyName;
怎么样封装成:
LogPrint(“My name is %s”, MyName)
解决方案
120
这样可以吗
#define LogPrint(a, b) (LINFO<<a<<b)
……继续阅读 »
9年前 (2016-04-16) 1778浏览
0个赞
本人想不出例子。
《C++ Primer》第五版,中文版。123 页。
解决方案
20
C++ ()
有很多用法
不同用法,含义不同
函数调用表达式的()只是参数表的界限
不能表示 其中实参表中,某个表达式先计算
而优先级运算符()表示优先计算括号内的表达式,
这地方应该算是可以改变顺序的
括号,还可以表示强制转换运算符 (int) x; int (x);
……继续阅读 »
9年前 (2016-04-16) 1266浏览
0个赞
下面的函数itoh(n,s)完成将无符号十进制整数转换成十六进制表示,并存入字符串组S中。程序中用到的函数reverse(char s[ ])是一个将字符串置逆的函数
itoh(unsighed n,char s[])
{int h,i=0;
do{h=%16;
s[i++]=(h<=9)?h+”0″:”a̶……继续阅读 »
9年前 (2016-04-16) 2154浏览
0个赞
#include<stdio.h>
#include<errno.h>
#include<string.h>
int main()
{
FILE *fp=fopen("/linux/uc/day02","r");
if(fp==NULL)
{
……继续阅读 »
9年前 (2016-04-16) 1105浏览
0个赞
#pragma comment(lib,"user32")
#pragma comment(lib,"gdi32")
#pragma comment(lib,"shell32")
#include <windows.h>
#include <Shlwapi.h>
#include <shlobj.h>
#include ……继续阅读 »
9年前 (2016-04-16) 1413浏览
0个赞