I just implemented a super simple dice roller in Python, and I want to port it to C++, and maybe add some more features, too. Here's the code:

from random import randint
def roll():
      return randint(1, 6)
You're right, that's an extremely simple way of doing it, but it works just fine if you just need to roll one die, using the built-in pseudo-random number generator in Python. We can do something similar in C++ as follows:

#include <iostream>
#include <cstdlib>

int roll() {
	//%6 gives us a number between 0 and 5, and then adding 1 increments it so that it's between 1 and 6, inclusive.
	return rand() % 6 + 1;
}

int main() {
	//Roll the die 10 times and print the result of each roll.
	for(int i = 0; i < 7; i++) {
		std::cout << roll() << std::endl;
	}
	return 0;
}