can some one tell me whats wrong with this code?

Write your question here.
so i have looked this code over and over and i cant find anything wrong with it. is my code::blocks just glitching or am i just missing it?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  #include <iostream>

using namespace std;


int main()
{
    int year;
   cout<<"please enter year"<<endl;
   cin>>year;

   if (year=2015)
   {
       cout<< "the year is correct"<<endl;
   }
   else
   {
       cout<< "the year is not correct"<<endl;
   }
    return 0;
}
Line 12

you use "=" instead of "=="
ooooooooooooohhhh, right on thank you. im very new to this so yeah,
Topic archived. No new replies allowed.