follow-up: if I need to replace the "2" with "getNumber()" like so:
Qt Code:
// ...in myfile.cpp... // QPushButton *pb[2]; // or // const int tempNum = getNumber(); // QPushButton *pb[tempNum]; for(int a=0; a<2; a++) { myStack->addWidget(pb[a]); }To copy to clipboard, switch view to plain text mode
I get an error: expected constant expression. Is there a way around this?
Bookmarks