File Opening in C++ in Unix Env

Pls someone help me. This piece of code is giving me weird results.

ofstream outfile;
ofstream out;

char filename1[72];
char filename2[72];

memset(filename1,'\0',sizeof(filename1));
memset(filename2,'\0',sizeof(filename2));

strcpy(filename1,"Testing1.out");
strcpy(filename2,"Testing2.out");

cout << filename1 << filename2;

outfile.open(filename1,ios::out);
cout << filename1;
out.open(filename2);
cout <, filename2;

The problem here is the first time I print filename1, the value is shown correctly, but after .open, the filename has become null. I get a file create error also. Whereas the filename2 has no problems. I have tried opening filename1 in out and app modes, with binary without binary etc without success.
I have to create the filename1.

Does anybody have any clue as why this is happening?