[gdal-dev] GDAL warp tutorial question (C vs. C++)

Michael Sumner mdsumner at gmail.com
Mon Apr 4 16:28:56 PDT 2022


Hello, the warp tutorial  needs at least inclusion of "cpl_conv.h" for
CPLMalloc to work.

https://gdal.org/tutorials/warp_tut.html

But, I'd like to ask why it uses the style of the C examples (as per the
Raster API tutorial https://gdal.org/tutorials/raster_api_tut.html) rather
than the C++ - i.e. it uses 'GDALDatasetH hSrcDS' declarations rather than
'GDALDataset *poDataset', and all the 'GDAL<Functions>' rather than '->'
pointer syntax.

Is that recommended, or is it just old style in this tutorial (because the
apps were originally C)?

(I still get rather stuck on some of these issues, my C++ is rudimentary -
certainly I'm keen to contribute to docs and more once I understand
better).

Thanks a lot.

Best, Mike


-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220405/a7a75a50/attachment.html>


More information about the gdal-dev mailing list