point

Hi . what is my error in program
#include <iostream>

using namespace std;

int main()
{
char name[20];
char* ptr1,*ptr2;

system("title Lab 1: Are you ready?");
cout << "Enter a name -> ";
cin >> name;
cout << "Output : ";

for (ptr1 = &name[0]; ptr1 != '\0'; ptr1++)
{
for (ptr2 = ptr1; ptr2 != '\0'; ptr2++)
cout << *ptr2;
cout << ' ';
}
cout << endl;

system("pause");
return 0;
}

Topic archived. No new replies allowed.