Im making a guessing game in c++. THis is my first attempt at a program. I cant figure out how to do it. Heres my code, i dont know whats wrong:

#include <iostream.h>
int main ()
{
int guess;
int num;
cout<<"Enter a guess";
cin>>guess;
if(guess = num)
{
cout>>"You guessed the right number!";
}
else
{
cout>>"Try again"
}
}