im trying to generate 3 random numbers between 1 and 6 using a function called generate_rand..
but everytime im having an error :
no oprators "<<" matches these operands
and
the last error was :end of file found before the left brace
my program is the following :
# include<iostream>
#include<cstdlib>
using namespace std;
void generate_rand(int&,int&,int&);
int main()
{
int a,b,c;
cout<<generate_rand(a,b,c);
}
void generate_rand(int&x,int&y,int&z)
{
x=1+rand()%6;
do{
y=1+rand()%6;
}
while (y==x);
do{
z=1+rand()%6;
while(z==x ||z==y);
}