My professor asks that we use the while function in c++ for a code we are writing. I keep returning the same error, so I wrote a simple simple code to understand the while loop. Still stuck at this part. It obviously isn't the end of my program, I just gets stuck at the while function. Any ideas?
#include <iostream>
#include <cstdlib>
using namespace std;
void response (){
cout<<" Continue loop function?\n";
cout <<"y - yes\nn - no\n";
char response='y';
cin>> response;
return;
}
int main (){
response ();
while (response=='y')
return 0;
}