请大哥大姐们帮我看下这段代码怎么错了,非常感谢

来源:百度知道 编辑:UC知道 时间:2024/07/16 07:10:51
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <conio.h>

#include "variable.h"
#include "fuction.h"

long *pStdNum = NULL;
float *pScore = NULL;
char *pCorName = NULL;

InputNum(&n,&m);
error = PrgLoad(pStdNum,pScore,pCorName,n,m);
int PrgLoad(long *p1,float *p2,char *p3,int x,int y)
{
int error=0;

☆ p1 = (long *)calloc(x,sizeof(long));
p2 = (float *)calloc(x * y,sizeof(float));
p3 = (char *)calloc(y,sizeof(char));
当我启用调试后,在☆设置了断点, 此处显示p1=0x00000000,
CXX0030:错误:无法计算表达式的值

我翻了些书和参考资料,发现语法上没有错误,可怎么改都不行,
我用的Microsoft Visual Studio 2005,C++的win32,小弟刚学没多久,老师布置的题目,三更半夜也没办法请教同学老师了,这问题解决不了睡不着啊,要命了,请帮帮我吧,谢谢了~~

孩子,断点你到的时候,那条语句还没执行,可不是null吗。

哈哈,C++的win32?这个的有C++基础,你是第一次调程序吗?汗

- -|||一起家游乐。