[netcdfgroup] NcFile close() member function?

Hello,
I have (I think...) a very simple question. I'm using the netCDF C++
libraries (version 4.2.1, --has-c++4 -> yes). I am unsure how to close
files, manually (before the destructor is called). According to this URL:

http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-cxx4/Class-NcFile.html

there should be a close(void) member function. Here is a test file

#include <iostream>
#include <netcdf>
using namespace std;
using namespace netCDF;
using namespace netCDF::exceptions;

int main()
{
NcFile ncfile(file.nc, NcFile::read);
ncfile.close();
return 0;
}

I get the error

error: ‘class netCDF::NcFile’ has no member named ‘close’

Am I misusing this method? How can I clear that memory (at the end of a
loop) so that I can open several files in sequence with the same handle
'ncfile'? Thank you!

-- 
Taylor Binnington
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: