Author Topic: code::blocks does not autocomplete keywords from "cstdlib"  (Read 1120 times)

Offline Crabby

  • Single posting newcomer
  • *
  • Posts: 1
code::blocks does not autocomplete keywords from "cstdlib"
« on: September 03, 2021, 02:40:49 pm »
I have this code:

#include <iostream>
#include <cstdlib>
#include <ctime>

using namespace std;

void printRandomDice(int amount) {
    srand(time(0));

    for (int i; i < amount; i++) {
        cout << (rand() % 6) + 1 << endl;
    }
}

int main()
{
    printRandomDice(5);
}



It works perfectly but the thing is that when I was writing "rand()" and "srand(time(0))", it didn't show autocomplete options for those functions. I really want to knw how i can get this fixed.