expression must have bool type

I have this error that I cannot fix. I looked it up online but nothing is helping. go_on after the while had a line under it and it says expression must have bool type. What does that mean?

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main() {
double answer;
int num = 1;
int numbers[10];
int counter = 0;
int counter2 = 0;
string go_on;
while (go_on = "yes") {
You are doing an assignment (=) inside the while loop condition. I suspect you meant to do a comparison (==).
Topic archived. No new replies allowed.