#include<iostream>
#include<string>
using namespace std;
int main()
{
int size; char str[size]; cin>>size;
for(int i=0; i<size; i++)
{
cin>>str[i];
}
return 0;
}
example: size=10; I was expecting this program to take 10 inputs but it is taking severral inputs. if it has something to do with cin then please explain.
I fixed it. Try it.