Start New Discussion within our Software Development Community

Hello, wondering if someone can help me.

I'm working with a .wav file, and, I need to collect the header information. The header contains (roughly, 20 bits/bytes) before the actual data. And, each of this data is contained at different locations in the file. I need to read a particular amount of integers in the text. For example:

Data = 


For the first header information, I need to gather the first 4 integers.. So:

Data = {

The code that I have written, reads in the first integers, however, reads them like this:

  Data = {

This is obviously wrong, but, I can't figure out how to read the whole of the integer inside element[0]..[3] - Here is the code: (Data type is char)

bool Wav::readHeader(ifstream& dataIn)
    // READ and VALIDATE the Type>type, 4);

    for(unsigned i=0; (i < 4); i++)
        cout << this->type[i] << endl;
    // testing purposes
    return true;

Could anyone offer any solutions?

Thank you very much :)!

Well.. I offically feel stupid. Problem solved, It's late and my brain doesn't function after a certain time!

This question has already been answered. Start a new discussion instead.