Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Why i having this error using opengl C++ here part of code #include \"glaux.h\"

ID: 653260 • Letter: W

Question

Why i having this error using opengl C++

here part of code

#include "glaux.h"
#include "glut.h"
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <time.h>

some coder here and etc

bool isGood(Tpos a)
{
DataToCp();
int k=0,i,j,lt;
Tpos temp;
cp[a.y][a.x]='x';
if ((step(a.y,a.x)>3)||(step(a.y+1,a.x)>3)||(step(a.y-1,a.x)>3)||(step(a.y,a.x+1)>3)||(step(a.y,a.x-1)>3))
return false;
for(j=1;j<=m;j++)
for(i=1;i<=m;i++)
if (cp[j][i]=='.')
{
if (k>0)
return false;
fill(j,i,&temp,&lt);
k++;
}
return true;
}


void genMap()
{
int i,j;
map.x=m+2; map.z=m+2;
printf("Loading... ");
srand( (unsigned)time( NULL ) );
for (j=0;j<map.z;j++)
for (i=0;i<map.x;i++)
{
if ((i==0)||(j==0)||(i==map.x-1)||(j==map.z-1))
data[j][i]='x';
else
data[j][i]='.';
}

int k=0;
Tpos t;
while (k<(int)m*m/2.5)
{
t.x = rand()%mm+1;
t.y = rand()%mm+1;
if ((data[t.y][t.x]=='.')&&(isGood(t)))
{
data[t.y][t.x]='x';
k++;
}
}
for (j=1;j<=m;j++)
for (i=1;i<=m;i++)
if ((data[j][i]=='x')&&(step(j,i)>3))
{
data[j][i]='.';
}
for (j=1;j<=m;j++)
for (i=1;i<=m;i++)
if ((data[j][i]=='.')&&(step(j,i)<2))
{
t.x = i; t.y=j;
if (isGood(t))
data[j][i]='x';
}

Tpos ps[11]; k=0;
while (k<=10)
{
t.x = rand()%mm+1;
t.y = rand()%mm+1;
if (data[t.y][t.x]=='.')
{
ps[k]=t;
k++;
}
}
k=rand()%11;
player.x=ps[k].x;
player.z=ps[k].y;
DataToCp();
fill(ps[k].y,ps[k].x,&t,&pathLen);
ex.x=t.x;
ex.z=t.y;

printf("Loading Completed. ");
}

Explanation / Answer

it seems the problem is in the

#include "glaux.h"
#include "glut.h"

pl. check these files. Maximum errors are related to the reference to various methods.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote