help in my program

i need a program that user gives his name middle name and family name ( composed or single to print them ) i want it to be done as strings and arrays . my code till now is .
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "stdafx.h"
#include "iostream"
#include "string"
using namespace std;
int main ()
{
	string a;
	char j[100];
	int i, c, b; 
	cout <<"enter your name ";
		getline(cin,a);
		cout << " welcome " << a << endl;
c=a.size; 
for (b=0; b<=c; b++)
j[b]=a[b];
i[b]='\0';
system ("pause");
return 0; 
}
I know that this thread was created before the other, but please don't double post: http://www.cplusplus.com/forum/general/150618/
Topic archived. No new replies allowed.