I want to ask that what should I do to remove this error but it is also working in my compiler and also in my debugger and please tell me about this error
and my code is:
#include<iostream>
#include<cmath>
#include<windows.h>
#include<stdio.h>
#include<cstring>
using namespace std;
struct forest
{
int number;
int cost;
string ch;
forest *link;
}*a,*b,*start;
int main()
{
int q,z,total=0;
int *g;
int n,in,i,m=0;
char sk[10];
string s[40]= {"Alizarin","Amber","Amethyst","Apricot","Aqua","Aquamarine","Asparagus","Auburn","Azure","Beige""Bistre","Black","Blue","Blue Green","Blue Violet","Bondi Blue","Brass","Bronze","Brown","Buff","Burgundy","Burnt Orange","Burnt Sienna","Burnt Umber","Camouflage Green","Caput Mortuum","Cardinal","Carmine","Carrot orange","Celadon","Cerise","Cerulean","Champagne","Charcoal","Chartreuse","Cherry Blossom Pink","Chestnut","Chocolate","Cinnabar","Cinnamon"};
int w[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173};
cout<<"Enter the no. of ballons u have:";
cin>>n;
if(n>=1&&n<=40)
{
a=new forest;
start=a;
int h=1;
for(i=0;i<n;i++)
{
a->number=h;
a->ch=s[m];
a->cost=w[m];
b=new forest;
a->link=b;
a=b;
h++;
m++;
}
b->link=NULL;
b=start;
while(b->link!=NULL)
{
cout<<"\t\t"<<b->ch<<" "<<"$"<<b->cost<<endl;
b=b->link;
}
int f;
cout<<"How amny color combinations u Want";
cin>>f;
g=new int[n*f];
cout<<"Enter your choice for selecting the pattern";
for(int p=0;p<n*f;p++)
{
cin>>g[p];
}
for(int p=0;p<n*f;p++)
{
b=start;
while(b->number!=g[p])
{
b=b->link;
}
q=b->cost;
total=total+q;
}
}
cout<<"Expected cost for the bill is:"<<"$"<<total;
getchar();
return 0;
}