Start a vector within a struct

Asked

Viewed 30 times

-3

Good afternoon. I wish to start a vector of integers within a struct, but I am accusing you that you need a ";". inserir a descrição da imagem aqui

Follow the image. Note: it is not the comma dps of the last zero the problem, because I took the print before taking, and even dps to take continue with the same problem.

  • Hello, could you put your code inside the question, textual? It is not necessary to remove the image, but it is important to have the essential parts of your source code in the body of the question. Learn why it’s not cool to put pictures in questions Post Error Message as Picture. One of the reasons is that if someone wants to answer the question, they cannot copy and execute their code. Images do not play well in search engines because content cannot be indexed.

1 answer

0

If I am not mistaken, it is not possible to declare the value of a variable within a struct. You will have to initialize it, something like this:

 for(int i = 0; i < 32; i++){
     procedimento.dente[i] = 0;
 }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.