#define _CRT_SECURE_NO_WARNINGS//去掉安全检查
#include
#include
#include< string.h>
struct info
{
char name[100];
int num;
};
typedef struct info* P;
void main()
{
P ip;
ip = (P)malloc(sizeof(struct info));//为什么这里提示不能强制转换
strcpy(ip->name, "zhangsan");
ip->num = 100;
printf("%s,%d\n", ip->name, ip->num);
system("pause");
}