"Expected unqualified-id"?

Hello forumers,
I was trying to do this while statement and I came up with this odd error:
I searched in the forum for the same thing and nothing helpful came up.
What could my issue be?

Thanks in advance!
Henry 344E

Is that code outside of all functions ? If so, that’s the error, for example, this will cause it.

#include "vex.h"

using namespace vex;

// A global instance of vex::brain used for printing to the V5 brain screen
vex::brain       Brain;

// define your global instances of motors and other devices here
int main() {

bool shoot = false;

while(shoot) {
    Brain.Screen.printAt( 10, 50, "Hello V5 %d", count++ );
    // Allow other tasks to run

put the code inside a function.


Okay, yeah that makes sense. Thanks for the help!