#include<iostream>
#include<string>
using namespace std;
void main()
{
string str="hello world";
string::const_iterator p=str.begin();
while(p!=str.end())
{
cout<<*P<<endl;
p++;
}
}
when i try to run this program.it doesn't working.
it tells me the 'p' is not declared identifier.
string::const_iterator p//the defination is wrong?