I also have another query..In c-free 4.0, I included only ap.cpp and the header file ap.h (just to learn about real_2d_array objects). But there is one last problem..
I have a double datatype array say a[2][2] and want to copy its contents to real_2d_array object say b.
I took a double pointer (*p=NULL)and did p=b[0] so that I may store value in b via p and increment it by 1.. i.e
*(p+0xi)+j=a[i][j]; but its not working.
I tried simple equating b[0][0]=a[0][0] but when we execute, it says <filename>.exe has stopped working.. Any help is greatly appreciated..
Program--->
#include<iostream> #include<conio.h> #include<stdio.h> #include<math.h> #include "ap.cpp" #include<ap.h> int main() { using namespace::alglib; real_2d_array b; double a[2][2]={{0.99,0.99},{1.00,1.00}}; b[0][0]=a[0][0]; cout<<b[0][0]; getch(); return(0); }
|