how to read dem file of usgs with c?

hi,
I want to get dem file data of usgs to make
my own format,how can i read dem of usgs with c? thank you

Yes, I am sure there is C code for loading dem files, I have seen it but don’t have the link.

Just do a google search.

Originally posted by yqs2002:
hi,
I want to get dem file data of usgs to make
my own format,how can i read dem of usgs with c? thank you

but I can’t find the c code

Search for demtopgm. Loading pgm is trivial, or else convert to tga.