while current perfect square is less than or equal to n
while ( current <= n ) { perfectSquares . push_back ( current ) ; current = static_cast < int > ( pow ( ++ i , 2 ) ) ; } return perfectSquares ; }