Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: yaids
  • Order by date
  1. yaids

    reading in bits in a binary file

    Thanks for the help guys.
  2. yaids

    reading in bits in a binary file

    Hmm ok, I re-read your previous post and I think it answers my question. Yes, I wanted to convert 8 bits in char directly into an int (the first case that you mention). So then I could just typecast the char into an int?
  3. yaids

    reading in bits in a binary file

    OK say I did read in the 8 bits as a char. How would I then go about converting that into an integer value? I have a function that converts from binary to integer by taking in a char* or string, but I don't know how I could do it with a char. Any suggestions?
  4. yaids

    reading in bits in a binary file

    So there definitely is no way to read in individual bits in a binary file? I just need to be sure, because I read somewhere that C++ allows bitset operations.
  5. yaids

    reading in bits in a binary file

    Sorry, what I mean is, a char corresponds to an ASCII character, but there are only about 100 or so ASCII characters that exist. So if the bit encoding doesn't correspond or translate to an ASCII character, wouldn't that mean the bits are lost? general example: '1001 1001 = 'A' But what if...
  6. yaids

    reading in bits in a binary file

    Hi, any help would be appreciated. I am opening a binary file using an input filestream, and need to read in the first octet of bits (one byte?) to perform operations on. Is there any way to just read in 8 bits? I tried doing this by reading in a 'char', but then realised that a char does not...
  7. yaids

    reading in binary file

    Hello, I want to open a binary file and read in a single octet of data (I assume this to be one-byte?). Is there a C++ function that does this?
  8. yaids

    easy(?) array sorting question

    Hi, Sorry if this question seems really stupid. For this code I'm reading in a text file containing numbers and retrieving the minimum and maximum numbers. (Each number is on a separate line in random order). I can work out the maximum number but can't work out the minimum number correctly. Any...
  9. yaids

    simple array length question

    Sorry, maybe if I explain what I'm trying to do it might help a bit. I basically want to read a text file with times in them. So: 19.30 20.00 16.00 21.30 19.00 I want to read in each time, find out the earliest and latest times and then increment in half hour blocks from the earliest to the...
  10. yaids

    simple array length question

    Hey thanks for your reply. You say I already have the length when I declared the array, but I thought that is just setting the size of it. The thing is, can you find out how many elements are being stored in the array? Is there any way to do this just by using an array? I'm sorry if my...
  11. yaids

    simple array length question

    hi i want to loop through an array and need to get its length, ie. the number of elements stored inside. however, the compiler doesnt like num.length(); it says: request for members 'length' in 'num', which is of non-aggregate type 'double[10]'. i have no idea what this means. if anyone could...

Part and Inventory Search

Back
Top