#include void proviamo(); void proviamoNotCorrect(); const Float_t fgkAl3parameters[3] = {3., 4., 0.1}; void proviamo() { Float_t *ccc; for (Int_t ii=0; ii<3; ii++) ccc[ii] = fgkAl3parameters[ii]; cout << ccc[0] << " " << ccc[1] << " " << ccc[2] << endl; // When I made the following: // .L proviamo.C // I don't receive errors // but the execution stops with a segmentation violation // When I made the following: // .L proviamo.C++ // I don't receive errors // and the execution ends correctly } void proviamoNotCorrect() { Float_t *ccc = &fgkAl3parameters; cout << ccc[0] << " " << ccc[1] << " " << ccc[2] << endl; // When I made the following: // .L proviamo.C // I don't receive errors // and the execution ends correctly // When I made the following: // .L proviamo.C++ // I receive the following error: // ./proviamo.C:31: error: cannot convert `const Float_t (*)[3]' // to `Float_t*' in initialization }