so if I have const int SIZE = 4; and a while loop

const int SIZE = 4;
int counter = 0;



    while(true) {

      // do something ...

      if(SIZE == counter+1) {cout << "Hello world"}



    }

 why is this not working? and how is the right way to do it? 
    const int SIZE = 4;
    int counter = 0;
    while(counter<SIZE) {

        // do something ...

        if(SIZE == counter+1) { cout << "Hello world"; }

        counter++;
        }