Archived

This topic is now archived and is closed to further replies.

read out in an array

This topic is 5777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

    
 void LoadRawFile(LPSTR strName, int nSize, BYTE *pHeightMap)
{FILE *pFile = NULL;
pFile = fopen( strName, "rb" );
fread( pHeightMap, 1, nSize, pFile );
int result = ferror( pFile );
fclose(pFile);
}

int InitGL(GLvoid)
{
....	

...

LoadRawFile("Data/Terrain.raw", MAP_SIZE * MAP_SIZE,g_HeightMap);

....									}  
 
    
how can i read out these datas to the array WORLD[256][256]; ???? thanks Edited by - the origin on February 20, 2002 3:15:25 PM

Share this post


Link to post
Share on other sites