Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MyForm(void)
  2.         {
  3.             InitializeComponent();
  4.  
  5.             current_question_number = 0;
  6.             number_of_questions = 8;
  7.  
  8.            
  9.             arrQuestions = gcnew array<Question^>(number_of_questions);
  10.             user_answers = gcnew array<String^>(number_of_questions);
  11.  
  12.             for (int i = 0; i < number_of_questions; i++)
  13.             {
  14.                 //myArr->SetValue(System::Convert::ToString(i), i);
  15.                 String^ value;
  16.                 String^ rightAnsw;
  17.                 questionType type;
  18.                 array<String^ > ^tmp = gcnew array<String^ >(4);
  19.  
  20.                 //заполнить поля вопроса i
  21.                 tmp = addQuestion(i, tmp);
  22.  
  23.                 Question^ q = gcnew Question(value, type, rightAnsw, tmp);
  24.                 arrQuestions->SetValue(q, i);
  25.             }
  26.  
  27.             // визуализация первого вопроса
  28.             Question^ currentQuestion = arrQuestions->GetValue(0);
  29.             makeVisualization(currentQuestion);
  30.            
  31.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement