a not declared???

Hello!
please, where can I find syntax how to write this?
Many thanks!


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
int* po(int b){
int d1;
d1=3*b;
int d2;
d2=d1+5;

int * foo;
foo=new int[3];

a[0]=d1;
a[1]=d2;
a[2]=a[1]+3;

int * foo;
foo=new int[3];
*foo=int a[0];
*(foo+1)=a[1];
*(foo+2)=a[2];
cout<<"po: "<<p<<endl;
return p;
}


int main(){
int st=4;
cout<<" main: "<<po(st)<<"xx"<<endl<<endl<<endl;
int* h;
h=po(st);
cout<<endl;
cout<<"main: "<<*h<<endl;
return 0;
}
Topic archived. No new replies allowed.