I set a constant value
#define N 100 int main() { int A[N] [N]; //почему это неправильно? И как нужно чтобы компилятор не ругался (VS2017) ? int i, j; ..... I set a constant value
#define N 100 int main() { int A[N] [N]; //почему это неправильно? И как нужно чтобы компилятор не ругался (VS2017) ? int i, j; ..... Your
int N; due to
#define N 100 turns into
int 100; which is completely incomprehensible to the compiler, because it is not a correct C construct. Just remove this line — you do not need it.
The code has #define N 100 and int N; . One of N must be renamed. And never again give variable / macro names to variables (and not use single-letter names at all).
Source: https://ru.stackoverflow.com/questions/910231/
All Articles