69,371
社区成员
发帖
与我相关
我的任务
分享
char temp;
char *key;
key = &temp;//*key = temp;
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
char temp='t';
char *key;
key = (char *)malloc(sizeof(char)*2);
*key = temp;
*(key+1)='\0';
puts(key);
system("pause");
return 0;
}
char temp;
char *key;
key = &temp;
or
*key = temp
?