How to rewrite following C++ code into C code?
How to do this in C? Please write entire code, because general hints don't help me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
using namespace std;
int main(){
double**ptr= new double*[2];
for(int i=0;i<2;++i)
ptr[i] =new double[2];
ptr[0][0]=76.65; ptr[0][1]=6.45;
**(ptr+1)=3.7; ptr[1][1]=2.0;
cout<<*ptr[0]<<" "<<*(*ptr+1)<<endl;
cout<<**(ptr+1)<<" "<<*(*(ptr+1)+1)<<endl;
return 0;
}
|
Duplicate request...
http://www.cplusplus.com/forum/beginner/207217/
Topic archived. No new replies allowed.