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 strongm 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: *

  1. tcat72

    convert from dec to hex and save in hex

    I have found the answer. I used the function itoa(). Here is an example: #include <stdio.h> #include <stdlib.h> int main() { char str[10]; /* MUST be big enough to hold all the characters of your number!! */ printf(&quot;15 in binary is %s\n&quot;, itoa(15, str, 2))...
  2. tcat72

    convert from dec to hex and save in hex

    my overall goal is to sort hexidecimal numbers. My problem is converting from long int to hex and saving my data in hex format so that I may sort it in that format. For example: long num = 1030507233; How do I convert and save this? I know that the hex value is 3d6c4ea1 because I can...
  3. tcat72

    Opening a file and reading in lines of integers

    I am trying to read in a line of integers. The file is like this: 4 3 0 0 1 0 0 1 2 3 3 4 4 0 the first two #s are fine, but lines 3-7 are giving me problems. How can I read each # in line 3 individually and perform some stuff on it, then continue to read the rest of the numbers and doing...
  4. tcat72

    Opening a file and reading in lines of integers

    I am trying to read in a line of integers. The file is like this: 4 3 0 0 1 0 0 1 2 3 3 4 4 0 the first two #s are fine, but lines 3-7 are giving me problems. How can I read each # in line 3 individually and perform some stuff on it, then continue to read the rest of the numbers and doing...

Part and Inventory Search

Back
Top