C++ expected constant expression

前端 未结 8 1508
日久生厌
日久生厌 2020-11-30 10:42
#include 
#include 
#include 
#include 
#include 
using std::ifstream;
using namespace std;
         


        
8条回答
  •  广开言路
    2020-11-30 11:08

    You haven't assigned any value to size; thus the compiler cannot allocate the memory for the array. (An array of null size? What?)

    Additionally, you'd need to make SIZE a constant, and not a variable.

    EDIT: Unfortunately, this response no longer makes sense since the poster has changed their question.

提交回复
热议问题