Hello, I'm trying to write a program which outputs "n" (input) fibonacci numbers : **Hello!**

I am struggling with my program. 
It should output n Fibonacci numbers, each on a new line. If the Fibonacci number exceeds the range of an unsigned int you should just exit the program. Moreover, you should print on a new line how many Fibonaccis of "n" are displayed. 

Here is the code so far:

    #include<iostream>
    #include<limits>

    using namespace std;

    int main()
    {
      unsigned int n;

      cout << "Please enter the amount of fibonaccis you would like to compute:  " << endl;
      cin >> n;

      unsigned int next=1;
      unsigned int current=0;
      unsigned int c = current;
      unsigned int temp;
      unsigned int counter=1;
      
      //This bool returns true as soon as an overflow occurs
      bool overflow; 
     
     /*This bool checks, whether the newly computed 
        number is bigger than the previous number 
       (which may not be the case if an overflow occurs)*/

      bool nextBigger; 



      /*Somehow, I could only handle the first
        inputs by using "bruteforce".
        If I tried to combine it with the "main loop",
        it got all messy. */
 
      if(n==0)
      {
        std::cout << "0" << " of " << n << endl;
      }

      else if(n==1)
      {
         std::cout << "0" << endl << "1 of " << n << endl;
      }

      else if(n==2)
      {
         std::cout << "0" << endl << "1" << endl << "2 of " << n << endl;
      }

      else
      {   /* This for-loop increases (at least it should) a counter
             by one for each computation of a valid fibonacci number*/
            
          for(counter=1;counter<n;++counter)
          {

             overflow = (c > (std::numeric_limits<unsigned int>::max()-temp));

             if(!overflow && nextBigger)
             {
                cout << next << endl;

             }
        
             else
            {
               break; //If overflow or next number < previous number, exit program
            }

            temp = next; //temp is storage variable for next
            c = current; //storage variable for current
            next += current; //next is being altered: it becomes the new fibonacci number
            current = temp; //current gets value of temp( value of next before being altered)
       }

      nextBigger = (next > current);

      cout << counter << " of " << n << endl; //Output of how many fibonaccis were computed
    }

      return 0;
    }

So here is the thing. I programmed it in "Codeblocks", where it worked perfectly. But then I tried to upload it in "Codeboard" (as an assignment). In Codeboard it suddenly didn't work at all. Maybe it has to do with the different Compilers, but I really have no clue how I could fix this issue. So I am quite puzzled and I'd be very thankful for any hints, ideas, corrections or inspirations.

(I am a beginner, so I hope the code is understandable and readable. I am open for suggested improvements.)