Independent of the loop logic, pass = "fudge" is an assignment, not a comparison.
a = 3; // set variable a to new value 3
if (a == 3) // check if value stored in a is equal to 3
You can in fact use an assignment inside a test, like this: if (a = 3) ...
This will set a to 3, then convert a into a Boolean value (true / false) to perform the test. This works for numbers, because C++ will interpret a zero as "false", and everything else as "true".
However a string cannot be implicitly converted into a Boolean value, which is what causes the error.
Once you "fix" it to say
... while (string == "fudge")
the loop logic will no longer work. The loop continues to run as long as the while condition is true, so entering anything other than "fudge" will now exit the loop.
Edit:
Regarding your update, you have it exactly backwards.
The while(pass != "fudge") part belongs to the do { } loop, not the cout line after it.
Here's pseudocode:
do {
EatMoreFood();
} while (you are hungry);
As soon as the while condition *fails*, the execution leaves the loop.
Back to the code, the loop keeps going while the entered password *doesn't* match "fudge".