// Bare minimum to generate compiler error:
// variable-sized object `array' may not be initialized
#include <iostream>
int main(int argc, char** argv) {
bool array[argc] = {false};
// bool array[17] = {false}; // Legal
return 0;
}
PS: I currently make sure it won't try to create a size 0 array, but what would happen if it did attempt to?

New Topic/Question
This topic is locked




MultiQuote








|