下面的程序为什么要这样修改才可以呢?
<cstdlib>
<ctime>
<cmath>
<iostream>
<vector>
<iterator>
<algorithm>
using namespace std;
using namespace std;
int main()
{
{
vector<double> v1; for ( int i = 0; i < 10; ++i ) { v1.push_back( i ); } vector<double> v2( v1.size() );
// transform( v1.begin(), v1.end(), v2.begin(), exp ); transform( v1.begin(), v1.end(), v2.begin(), ::exp );
copy( v2.begin(), v2.end(), ostream_iterator<double>( cout, " " ) ); cout << endl;
}