1,183
社区成员
发帖
与我相关
我的任务
分享
void ReadFile( char* fileName, int* shapeIdArray)
{
int width;
int height;
char* attibutes;
unsigned short* elevations;
FILE* file;
file = fopen (ffileName, "rb");
_ASSERTE (file);
width = 256;
height = 256;
elevations = (unsigned short*) malloc (width * height * sizeof (unsigned short));
attibutes = (char*) malloc (width * width * sizeof (char));
fread (elevations, sizeof (unsigned short), width * height, file);
memset (attibutes, 1, width * height * sizeof (char));
if (shapeIdArray) {
for (int i = 0; i < width * height; i ++) {
attibutes[i] = char(shapeIdArray[0]);
}
}
}