spreadsheetcellarraynodefault.cpp

来自「C++高级编程这本书所附的源代码」· C++ 代码 · 共 15 行

CPP
15
字号
#include "SpreadsheetCell.h"int main(int argc, char** argv){  // Comment out these next two lines to test the third line  SpreadsheetCell cells[3]; // FAILS compilation without a default constructor  SpreadsheetCell* myCellp = new SpreadsheetCell[10]; // also FAILS  // This line compiles without a default constructor  SpreadsheetCell cells[3] = {SpreadsheetCell(0), SpreadsheetCell(23),			      SpreadsheetCell(41)};  return (0);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?