Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c x 18
Member Avatar for fishwater00

Hi Folks, I got some problems and need your help. In school, my codes are writeen under UNIX system (Solaris10/SUN), now I need to transfer those codes to Linux (Redhat5). But after I directly copy to Linux, it shows many errors and warnings. Does anyone know which codes I need …

Member Avatar for JOAT
0
99
Member Avatar for fishwater00

I need to read parameters from a file called "params.c", the following is the codes which can read parameters from that file. But I am not totally understand. Hope anyone can give detailed answers. Thanks. In a file called "params.c" I have: [code=c] #include "systems.h" /* it includes all .h …

Member Avatar for ssharish2005
0
167
Member Avatar for fishwater00

I do not know how to express the array I am going to work with, but some codes can describe them. If I define an array and a struct with member : [code=c] float velocity; MODEL.VELOCITY; [/code] VELOCITY in struct MODEL is also float. then I alocate memory for them; …

Member Avatar for jephthah
0
126
Member Avatar for fishwater00

First of all, I need to thank all friends helping me here. Those days I learn a lot from your advices. The basic idea of my code is to read velocity file into domain[i].velocity[k]. Start!!! If I have a struct [code=c] typedef struct {int nx, ny, nz; float *velocity, *pwave, …

Member Avatar for fishwater00
0
139
Member Avatar for fishwater00

Question 1: [code=c] typedef struct { int x, y, z ; float *wave; float *velocity; }Model; void a(Model *domain); void b(Model *domain, int t); int main() {int i; int j=10; Model Domain; Domain=(Model *)malloc(sizeof(Model); for (i=0; i<10; i++) a(domain); return; } [/code] if I block "Domain=(Model *)malloc(sizeof(Model)", the compiler doesnt …

Member Avatar for fishwater00
0
253
Member Avatar for fishwater00

[code] #include ”functions.h” typedef struct { int x, int y, int z; }Model; int main() { Model PARA[100]; PARA=malloc(sizeof(struct Model)); myfunction(int A, int B, int C, PARA); return: } [/code] In another file, I define “myfunction”: [code] void myfunction(int a, int b, int c, Model *para) { a=b=c=10 ; /*can …

Member Avatar for fishwater00
0
105
Member Avatar for fishwater00

First of all, thanks! I have a problem about the arrays of structure in C, the following is my codes: #include "system.h" typedef struct { int x, int y, int z; short *velocity ; float *wave ; } Modeldim ; void myfunction(Modeldim *submodel) ; int main(int argc, char *argv[]) { …

Member Avatar for jephthah
0
116