From octave-sources-request at bevo dot che dot wisc dot edu Fri Oct 1 06:00:56 1999 Subject: Problem with vector classes From: Thomas Walter To: octave-sources at bevo dot che dot wisc dot edu Date: Fri, 1 Oct 1999 13:00:36 +0200 Hello, I have a problem with the behaviout of 'ColumnVector', 'RowVector' and the direct access to their data using 'fortran_vec()'. Example code: const ColumnVector xv = args (0).vector_value(); const double *my_data = xv.fortran_vec(); Using 'gcc-2.95.1' on a linux-box gives the following error message: heap_sort.cc: In function `class octave_value_list Frank_data(const octave_value_list &, int)': heap_sort.cc:321: passing `const ColumnVector' as `this' argument of `double * Array::fortran_vec()' discards qualifiers current fix to the example: /* const */ ColumnVector xv = args (0).vector_value(); const double *my_data = xv.fortran_vec(); Is it possible or are there plans to fix this? This could improve the coding to C-style functions which want a pointer to the data but for read only. Thanks for any hint Bye Thomas -- Latest news: Einbruch bei Microsoft, Bill Gates hat Windows offen gelassen. ---------------------------------------------- Dipl. Phys. Thomas Walter Inst. f. Physiklische Chemie II Egerlandstr. 3 Tel.: ++9131-85 27326 / 27330 91058 Erlangen, Germany email: walter at pctc dot chemie dot uni-erlangen dot de