Here you are creating a completely new variable called start instead of changing the start variable above, which isn't what you want to do as this is in local scope and nothing else will see it, just change it to start = false
You are using the width variable but that is never assigned any value except 0, meaning your loop will never run right now, you want the inner loop to be based on 'a' in this case. Here is your code with a few changes.
int size, width = 0;
bool start = true;
cout<<" Size of triangle : ";
cin>>size;
cout<<endl;
for (int a = 1; a <= size; a++)
{
for(int b = 1; b <= a; b++) // Goes up to whatever value a happens to be at this point
{
if(start == true)
{
cout<< " " << "#" << " ";
start = false;
}
else
{
cout<<" "<<"@"<<" ";
start = true; // Don't forget to change this back to true, which you forgot in your code
}
}
cout<<endl;
}
This could be optimized to not use the extra variable and only show certain symbols when the number is even/odd, but you should get the idea.