i am now trying to make random values. here is my simple lil program to learn more about it. it has a error when i compile tho.
the compiling errors are:Code:#include <iostream> #include <cstdlib> const int LOW = 1; const int HIGH = 6; int main() { int firstdie; int secdie; firstdie = rand() % (HIGH - LOW); secdie = rand() % (HIGH - LOW); cout << "You rolled a " << firstdie; cout << "\n\nAnd you rolled a " << secdie; system("pause"); }
C:\My Documents\C++ Stuff\Un-Important Working Programs\random.cpp
[Warning] In function `int main()':
15 C:\My Documents\C++ Stuff\Un-Important Working Programs\random.cpp
`cout' undeclared (first use this function)
15 C:\My Documents\C++ Stuff\Un-Important Working Programs\random.cpp
(Each undeclared identifier is reported only once for each function it appears
thx alot!