[Solved] The code is for to plot naca airfoil. I received the out of bound error when printing yc


linspace<vec> is most likely a zero based array. With 100 elements, the last index is 99.

Therefore, replace

for(int i=0;i<=100;i=i+1)

with

for(int i=0;i<100;++i)

I’ve replaced i=i+1 as I find that notation unbearable.

12

solved The code is for to plot naca airfoil. I received the out of bound error when printing yc