0

This is the very start of my program

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <vector>

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

#define _USE_MATH_DEFINES
#include <math.h>

const int NR_TREES = 100;
const int R = 50;
const int RI = 35;
const int RC = 15;

using namespace std;

float oldX, oldY;
float cameraAlfa, cameraBeta;
float cameraX, cameraY, cameraZ;
float dirX, dirY, dirZ;

vector<tuple<float, float>> treePoints;


void populateTrees(){
    srand(clock());

    for(int i = 0; i < NR_TREES; i++){
        float x = (float) (rand()) / ((float) (RAND_MAX/200)) - 100;
        float y = (float) (rand()) / ((float) (RAND_MAX/200)) - 100;

        if(x * x + y * y > R * R){
        treePoints.push_back(make_tuple(x, y)); //problem here
        }
        else{
            i--;
        }
    }
}

However, when I try to compile it says "use of undeclared identifier make_tuple", even thought in the vector declaration it works with tuple perfectly fine. I honestly have no idea... any help would be appreciated.

Pedro Fernandes
  • 216
  • 1
  • 12

1 Answers1

-1

Needed to include tuple. Was confused because tuple itself is in std

Pedro Fernandes
  • 216
  • 1
  • 12