when sheetCols is a class (as in your snippet), the code is fine.
when sheetCols is a struct, it would not be OK:
- you can't have initializers on struct members;
- every consrtuctor needs to initialize all data members.
Here are some suggestions for you:
- tell your IDE to always show line numbers in editor windows (see here[^]);
- watch the squiggly lines (red or green) Visual Studio uses to flag problems;
- watch the errors and warnings any IDE will produce; and focus on the first one first; you must get rid of all errors before you can execute, and it is wise to also get rid of the warnings.
- be meticulous; every single keyword and punctuation mark matters.
Have a look at my entry
for the lean-and-mean competition
; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!