Char array error

I am not getting the Second input
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #include<iostream>
using namespace std;

void hello(char *, char *);

int main()
{
	char arr[256], arr1[256];
	cin.get(arr, 256);
	cin.get(arr1, 256);
	hello(arr, arr1);
	system("pause");
}


void hello(char *a, char *b)
{
	cout << a << " " << b << " ";

}
i get it i just have to use cin.ignore(); between line no 8 and 9
Topic archived. No new replies allowed.