Search:

Type: Posts; User: lex2012

Search: Search took 0.01 seconds.

  1. This seems to have resolved the cast warning...

    This seems to have resolved the cast warning above:



    WAV_HDR loadWavFile(WAV_HDR *wav_p, FILE *filename)
    {

    WAV_HDR *wav;
    BYTE *dataBuffer = malloc(sizeof(BYTE) *...
  2. Thanks Salem- the segmentation 11 fault...

    Thanks Salem- the segmentation 11 fault disappeared after updating the dynamic memory assignment to the struct - i.e.: WAV_HDR *wav = malloc(sizeof(WAV_HDR));
    I have a void data type in my...
  3. Thanks Salem.. much appreciated. Have made...

    Thanks Salem.. much appreciated. Have made progress and worked through the warnings http://im.cprogramming.com/images/smilies/smile.png- so am just left with the segmentation 11 fault - that displays...
  4. Thanks Salem /Nonoob.. Salem in answer to your...

    Thanks Salem /Nonoob.. Salem in answer to your questions... yes -there were warnings - which i was going to work through after the error, and my code compiled and ran up to the loadWavFile(wav, &fp);...
  5. Hi - thanks for the very quick response - I am...

    Hi - thanks for the very quick response - I am new to C.. so am learning all the time. The program initialises a struct and reads the data from a wav file (following error checking). The next step...
  6. oops!! apologies - I didn't meant to post without...

    oops!! apologies - I didn't meant to post without the code (cllcked by mistake). Here is the related code up to where struct pointer is first called by fread:

    WAV_HDR loadWavFile(WAV_HDR *wav_p,...
  7. Segmentation 11 Fault: Fread struct pointer from file pointer

    Hi All - have researched this error for several days and tried different ways of referencing the struct pointer - though just leads to the same error. Debugging via gdb returns the following error:
    ...
Results 1 to 7 of 7