(minor corr) Problem with struct and malloc 
Author Message
 (minor corr) Problem with struct and malloc

Quote:

>     for (i=0; i<buff_size; i++){
>     fair_buff[i].valid = 0;               /* <----- CAUSING SEG. FAULT */
>     fair_buff[i].p = NULL;
> //    fail_buff[i].seq_num = 0;

Oops, used 'C++ style' comment which your compiler might
not support.

/*    fail_buff[i].seq_num = 0; */

Quote:
>     fair_buff[i].seq_num = 0;
>     }
> }

-Mike


Fri, 21 Oct 2005 03:09:49 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. A minor problem regarding string input and malloc()

2. Malloc & structs contain struct*

3. malloc()'ing struct to struct and comparison

4. Problem with struct and malloc

5. Struct & malloc problem : pointer expected

6. Minor, but annoying infoviewer problem

7. minor problem with arrays !

8. minor problem with ups and acc

9. Minor, but annoying infoviewer problem

10. (corr) Return value of memcpy et al.

11. Struct & Malloc

12. structs and malloc compile trouble

 

 
Powered by phpBB® Forum Software