#include <iostream>
using std::cin;
using std::cout;
using std::endl;

#include <string>

const numberOfSong=10;

int main ()
{
	char *songName[numberOfSong];
	int i;

	for ( i=0;i < numberOfSong;i++ )
	{
		cout << "Please enter the song: " << i+1 << endl;
		songName[i]=new char[256];
		cin >> songName[i];
	}

	for ( i=0;i < numberOfSong;i++ )
		cout << songName[i] << "\n";
	return 0;
}
为什么这个程序不能如预期的输入10个字符串呢?新手求教