typedef struct {
name_t name;
float beta[beta_num];
}gene_t;
gene_t **gene
/*assigning data to gene*/
Type: Posts; User: rocket_c
typedef struct {
name_t name;
float beta[beta_num];
}gene_t;
gene_t **gene
/*assigning data to gene*/
ic. I'll think about it. Thank you very much
And the array is dynamic
I want an array of genes.
/*Create an array of genes of the large matrix*/
gene_t *gene,gene1,gene2;
gene=malloc(INITIAL*sizeof(gene2));
But there is error: incompatible types in assignment
and
so it should be
&gene=malloc(INITIAL*sizeof(gene2)); ?
I am having troubles with dynamic arrays and pointers. All the errors are of that kind. I think when I am assigning malloc to an array we assign to its address. What are the problems of the...
I think there is something wrong with my concept of malloc. Maybe I modify the program. Thanks
Here is my code of allocation
gene_t gene1;
while(fscanf(fp,"%s %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f...
typedef struct { name_t name;
float beta[beta_num];
}gene_t;
gene_t gene[300]
/*assigning data to gene*/
/*some of them are allocated dynamically*/
for (i=0;i<count;i++) {
#include <stdio.h>#include <stdlib.h>
#include <string.h>
#include <strings.h>
I just download Xcode and then run on terminal. The editor is using TeXshop. The file is a .c file. It shows the...