Simple loops (idk why i dont get it)

Hi im i dont know how to do loop correctly. I have problem with it. I tried to set int but it seems not working.

........

int hacking = 0;

....................

void loop() {

 while (hacking = 1)
{ 
..................... (doing stuff)

}

It just ignores my int and even if the value i declared is 1 and while (tried also if) is 0 it still works. Why?

Please attach all of your code when asking for help.

No, post complete code that can compile and exhibits the problem. Your error might not be where you think it is.

Solved it. I used "=" instead of "=="