Hi

I have a bit of a delema, I am learning C++ while developing my own
through away toy program to make things more existing. I am also using
the gsl library, http://www.gnu.org/software/gsl/
which provides its API in C and not in C++, to call those C functions
in my C++ toy program, the library says;

2.10 Compatibility with C++

The library header files automatically define functions to have extern
"C" linkage when included in C++ programs. This allows the functions
to be called directly from C++. 

so for an example:

say you want to open a file to read its data into a matrix, gsl
provides
int gsl_matrix_fwrite (FILE * stream, const gsl_matrix * m)
the first argument is a C type and not a C++, which is confirmed by a gsl
example 
       {  
          FILE * f = fopen ("test.dat", "wb");
          gsl_matrix_fwrite (f, m);
          fclose (f);
       }
     
in such a case, am I have to learn C types instead of iostream I am
used to in C++?

thanks
     

                
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to 
Yahoo! Groups. 
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to