G
G
Gokilla2018-04-19 21:41:53
C++ / C#
Gokilla, 2018-04-19 21:41:53

rand() identifier not defined?

void Logic::SetRandom()
{
  int min = 3, max = 54;
  for (int i = 0; i<countF; i++)
    random[i] = min + rand() % (max - min + 1);
};
Серьезность	Код	Описание	Проект	Файл	Строка	Состояние подавления
Ошибка (активно)		идентификатор "rand" не определен	game	c:\Users\User\Desktop\nottoch\game3\game\game\Logic.cpp	18

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2018-04-19
@myjcom

#include<stdlib.h>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question