69,373
社区成员
发帖
与我相关
我的任务
分享
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
typedef struct test
{
int i;
char buff[256];
}Test, *test;
int main(int arg, char* argv[])
{
test tt = (Test*)malloc(sizeof(Test));
tt->i = 3;
strcpy(tt->buff, "Hello World!");
printf("%s\n", tt->buff);
return 0;
}
#include <iostream>
using namespace std;
typedef struct {
} Test, *PtrTest;
int main() {
Test t;
PtrTest pt = &t;
//PtrTest ppt = t; 这行是无法通过编译的
return 0;
}