Answer the question
In order to leave comments, you need to log in
Is it possible in C to define an array from a vector of values?
For example, define a vector first:
int f[X] = {8,9,8,9,11,13,15,15,15,14,14,14,13,13,12,12,11,11,10,10};
for (int x=0; x<M; ++x)
{
for (int y=0; y<N; ++y)
{
T[x][f[x]] = 100;
}
}
Answer the question
In order to leave comments, you need to log in
"For example, define a vector first:" - you define an array. Yes, you can write A[B[C[f[x]]]]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question