To be completely honest, I'm not too sure why you're making it like this, but what you're doing isn't legal. You made a char and an int, and then somehow turned that into an array and tried to access the index of the array checking for the null terminator. Since you're not including the String class, I'm going to assume you don't know how to use that, so I'll offer you some guidance until someone else posts. I learned to make strings using character arrays. It'll work basically the same:
cpp
// get access to cin and cout
#include <iostream>
using namespace std;
int main( void )
{
// initialize a char array of 100
// or whatever size
char arr[ 100 ] = { };
// ask the user to input
cout << "Enter String: ";
// use cin.get() to grab the string
// cin.get( variableName, size );
cin.get( arr, 100 );
cin.get() offers us some useful techniques, such as skipping over spaces if the user types two words. Now if you're error checking to make sure the user input something, I like to use a simple do{}while() loop to check:
cpp
do
{
// ask for input
cout << "Enter String: ";
cin.get( arr, 100 );
// check if user input SOMETHING
// makes sure user didn't just hit enter
if( cin.good() )
// if something entered
break;
// now we clear the failbit
cin.clear();
// get rid of the bad data
cin.ignore( INT_MAX, '\n' );
} while( true );
// it's good practice to use the ignore again
// after the loop
cin.ignore( INT_MAX, '\n' );
If you don't use the cin.ignore() call, the next time you try to use cin in any way, it won't work!! I just used INT_MAX to ignore the maximum number of values the user could have entered, and then the newline to ignore that also.
Again, I'm not really sure what you're trying to do, so if this doesn't answer your question, please let us know more specifically what troubles you're having.
****EDIT****
I did a little google search ( something you should have done

) and found
this link for you. The example uses pointers (which is how you should do this) so be sure to post if you don't understand pointers!
This post has been edited by Psionics: 28 Sep, 2008 - 05:47 AM