#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

static const int password = 1705898;

int main()
{
	int secondnumber;
    while(true);
    {
           cout << "Enter Password";
          cin >> secondnumber;
	
		  if (password = secondnumber)
		  {
               cout << "Welcome Matthew";
          }
          else
          {
               cout << "password Rejected";
          }
}
system ("PAUSE");
return 0;
}

one error:
line (16) : error C3892: 'password' : you cannot assign to a variable that is const

please help me fix it
thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.