<data_type> <array_name>[<variable>]
Yet g++ clearly allows this. Is this my misunderstanding? If so, can anyone point me in the direction of the appropriate C++ specs so that I may use as evidence? Or is this a bug or gotcha in g++? If so, should I file a bug report?
I have attached a sample .cpp which compiles and runs for me.
Thank you.
--
As a boy I jumped through Windows, as a man I play with Penguins.
#include <iostream> using namespace std; int main() { int array_size = 5; int array[array_size]; for (int i = 0; i < array_size; i++) { array[i] = i*i; } for (int i = 0; i < array_size; i++) { cout << array[i] << endl; } return 0; }
-- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list