int main(){
H5File file(FILE_NAME,H5F_ACC_RDONLY);
file.close();
return 0;
}
------------------------------------------------------------------------------------------------------------
but on compiling it gives me following error
[X@Y ~/H5exercise]$ g++ -o readh5 readh5.cpp
In file included from readh5.cpp:7:
/usr/local/include/H5File.h:24: error: expected initializer before ‘:’ token
readh5.cpp:16: error: expected ‘}’ at end of input
I am new to using HDF5 data.
I have just tried to open and close a hdf5 file using the following code-
--------------------------------------------------
#include<iostream>
#include<string>
#include<cstdlib>
[X@Y ~/H5exercise]$ g++ -o readh5 readh5.cpp
In file included from readh5.cpp:7:
/usr/local/include/H5File.h:24: error: expected initializer before ‘:’
token
readh5.cpp:16: error: expected ‘}’ at end of input
Kindly help me
_______________________________________________
Hdf-forum is for HDF software users discussion. Hdf-forum@lists.hdfgroup.org
int main(){
H5File file(FILE_NAME,H5F_ACC_RDONLY);
file.close();
return 0;
}
------------------------------------------------------------------------------------------------------------
but on compiling it gives me following error
[X@Y ~/H5exercise]$ g++ -o readh5 readh5.cpp
In file included from readh5.cpp:7:
/usr/local/include/H5File.h:24: error: expected initializer before ‘:’ token
readh5.cpp:16: error: expected ‘}’ at end of input
________________________________
From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of Pahal Tahlani <sacpreeti@gmail.com>
Sent: Tuesday, November 19, 2013 10:52 PM
To: Josiah Slack
Cc: HDF Users Discussion List
Subject: Re: [Hdf-forum] need help
Thanks a lot for your reply but I am getting the same error on using following code also:
#include<string>
#include<cstdlib>
using namespace std;
#include"H5File.h" #include"H5Exception.h"
int main(){
//H5File file(FILE_NAME,H5F_ACC_RDONLY); //file.close();
return 0;
}
Looks to me like you need a ';' after FILE_NAME's declaration.
On Tue, Nov 19, 2013 at 6:37 AM, Preeti <sacpreeti@gmail.com<mailto:sacpreeti@gmail.com>> wrote:
I am new to using HDF5 data.
I have just tried to open and close a hdf5 file using the following code-
include<string>
#include<cstdlib>
int main(){
H5File file(FILE_NAME,H5F_ACC_RDONLY);
file.close();
return 0;
}
------------------------------------------------------------------------------------------------------------
but on compiling it gives me following error
[X@Y ~/H5exercise]$ g++ -o readh5 readh5.cpp
In file included from readh5.cpp:7:
/usr/local/include/H5File.h:24: error: expected initializer before ':' token
readh5.cpp:16: error: expected '}' at end of input