#include < iostream. h >
void main( ){
float * p;
p = new float[ 5 ] ;
for( i =0;i <5 ;i + + )
{ cin > > * (p + i) ;cout << * (p + i) << endl; }
delete [ ] p;
}
FOR(I=0;I<5;I++)错误,变量I必须先定义后使用
#include < iostream. h >
void main( ){
float * p;
p = new float[ 5 ] ;
for( i =0;i <5 ;i + + )
{ cin > > * (p + i) ;cout << * (p + i) << endl; }
delete [ ] p;
}
#include < iostream. h >
void main( ){
float * p;
p = new float[ 5 ] ;
for( i =0;i <5 ;i + + )
{ cin > > * (p + i) ;cout << * (p + i) << endl; }
delete [ ] p;
}
FOR(I=0;I<5;I++)错误,变量I必须先定义后使用