Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for habib_parisa

I am using Ubuntu-gcc and have a large C code which uses routines from numerical recipes and GNU scientific library. It needs a compilation compilation because each library, i.e. nr and GNUsl, needs its own flags for gcc. Therefore I use a makefile. It works well when the code is …

Member Avatar for griswolf
0
362
Member Avatar for habib_parisa

Dear All, I am trying to use free function in C to free memory of an array of pointers. It does not work and I get segmentation fault. The code looks like this: [CODE] #include <stdio.h> #include <stdlib.h> int main() { int *make_pointer(int); void read_array(int *array[3]); /****************/ int *array[3] ; …

Member Avatar for jephthah
0
6K
Member Avatar for habib_parisa

Dear all, I am writting a code for high dimensional chebyshev interpolation. Since it is high dimensional, I MUST use extremely large arrays. Something like this: [CODE] #define DIM (int)2 #define TOTAL_STEPS (int)30 int main(){ double *a_data; long long a_dim; /** length of matrix a_data **/ int n; /** # …

Member Avatar for jephthah
0
183
Member Avatar for habib_parisa

Dear all, I have to use a funny structure in my code which has a 2D array and allocate it in the program. I do not know how to use malloc for that. This is the code: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define NUMBER_DECISION_VARIABLES (int)4 #define DIM …

Member Avatar for Salem
0
159
Member Avatar for habib_parisa

Dear all, I have to use a funny structure in my code which has a 2D array and allocate it later in the program. I do it but I get error which is written below. I have urgently to finish this part of the code. Would be agreat help if …

Member Avatar for VernonDozier
0
394
Member Avatar for habib_parisa

Dear all, I am trying to understand a C++ code. In one part of the code a one dimensional vector is copied into a two dimensional vector. I do not understand at all how such thing can work. But compiler is quite ok with that. #define TOTAL_STEPS 120 #define NUMBER_DECISION_VARIABLES …

Member Avatar for habib_parisa
1
1K
Member Avatar for habib_parisa

Dear All, I am a C code to calculate prices in stock market. I pass a two dimensional array to a function as [CODE] #define DIM 3000 void grid(double tree[][DIM]); int main(){ double tree[DIM][DIM]; grid(tree ); return 0; } void grid(double tree[DIM][DIM]){ /* and do sutff on tree * } …

Member Avatar for Ancient Dragon
0
135