Search:

Type: Posts; User: Spork Schivago

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. So you're saying try to use rename() / link() and...

    So you're saying try to use rename() / link() and if it fails because the temp file is on a different filesystem, then manually read the temp file and write it to the new file? Back in the 90's,...
  2. Thank you for your response Laserlight. The...

    Thank you for your response Laserlight. The reason rename() won't work is because in Linux, usually the /tmp directory is a different filesystem that's mounted at boot. OpenSUSE does it this way,...
  3. Best way to move / rename a file in C.

    Hello,

    Could someone give me some ideas on what they consider to be the best way to rename / move a file in C? My program will run in Windows and in Linux. The rename() function isn't really...
  4. Thank you! That's what I was missing. Much...

    Thank you! That's what I was missing. Much appreciated!
  5. I am so stupid. I forgot to initialize the...

    I am so stupid. I forgot to initialize the integers to 0. So when I was testing the values of the various integers, some were coming back as being set. So, another question though. In the...
  6. Thank you for the reply Salem. I have been...

    Thank you for the reply Salem. I have been trying to experiment with the getopt_long function and I have been using printf / fprintf statements to try and figure out what the flag variable does, but...
  7. Need help with getopt_long function.

    Hello,

    I'm writing a program. I'd like it to be compatible with MinGW's C compiler and Linux. Right now, I'm writing the code in Linux. I'm not 100% sure MinGW has the getopt_long function...
  8. Replies
    16
    Views
    932

    If it was my system, I'd check the electrolytics...

    If it was my system, I'd check the electrolytics caps first. If you have an ESR meter, just pull the caps and check them. If not, it wouldn't hurt to do a physical inspection of the caps on the...
  9. Replies
    0
    Views
    762

    LHa LH5 file format.

    Hello,

    Could someone please point me to some in depth documentation on the LHA archive format, in English? I'm only interested in the LH5 method right now. I'd like to write a custom C program...
  10. Replies
    12
    Views
    1,114

    Also, in your new program, the indentation is a...

    Also, in your new program, the indentation is a bit messed up. If someone was reading through it quickly, it looks like your switch(b) is by itself, when in reality, it's part of your case 4:...
  11. Replies
    1
    Views
    374

    Does this code compile? On my system, it...

    Does this code compile? On my system, it doesn't. I can see a few problems with your code. Your style of indentation makes it a bit hard to read. First off, I believe your do while loop is...
  12. Replies
    9
    Views
    14,161

    I made a mistake, actually, I've made a few. ...

    I made a mistake, actually, I've made a few. Guess it's time to call it a night and relook at things tomorrow. Just been a long day. I figure when I'm making mistakes like this, there's no...
  13. Replies
    9
    Views
    14,161

    Thank you. So PRIx32 works for unsigned and...

    Thank you. So PRIx32 works for unsigned and signed? I don't have to specify that it's unsigned?
  14. Replies
    9
    Views
    14,161

    Yes, I do include stdio.h, I just didn't copy and...

    Yes, I do include stdio.h, I just didn't copy and paste it into my post. I didn't think it was necessary. Sorry. It is included though.
  15. Replies
    9
    Views
    14,161

    I'm pretty sure I need to use the PRI macros here...

    I'm pretty sure I need to use the PRI macros here because I don't know a head of time what size the variable is. For example, uint32_t might be different sizes on different systems (ie, 32-bit vs...
  16. Replies
    9
    Views
    14,161

    %x doesn't work. It gives a warning. ...

    %x doesn't work. It gives a warning.


    warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  17. Replies
    9
    Views
    14,161

    How to print uint32_t variable in hex?

    Hello,

    How can I print a uint32_t type variable in hex? Here's my code and the output:


    /* types.h */
    #ifndef __MYTYPES_H__
    #define __MYTYPES_H__

    #include <stdint.h>
  18. Also, adding to what Cas said, I found sometimes...

    Also, adding to what Cas said, I found sometimes the order of the libraries matter. For example, trying something like this might fix your problem:


    gcc gntring3_read_async.o...
  19. Replies
    3
    Views
    463

    How are you creating the text file? What OS are...

    How are you creating the text file? What OS are you in? In Linux, when I compile your code (with the airports.txt file created), it displays:
    Airport City/State Population Lat Lon

    Seems to...
  20. Boy do I feel stupid, you linked to the 2nd...

    Boy do I feel stupid, you linked to the 2nd edition! Sorry about all that!
  21. For C Programming, A Modern Approach, by K.N....

    For C Programming, A Modern Approach, by K.N. King, I believe only the second edition tries to fully cover C99. I might be wrong, but I think the first edition covered C++ stuff whereas in the...
  22. Replies
    1
    Views
    386

    Could you show the rest of your code? The two...

    Could you show the rest of your code? The two functions NumberOfDigits(...) and DthDigitOfX(...). Also, why are you declaring them inside the IsArmstrongNumber(...) function?


    int...
  23. Oh, the reason the second example works is...

    Oh, the reason the second example works is because you're doing the type cast to float by putting a .0 after the decimal. You're no longer dividing an integer by an integer. You're now dividing a...
  24. I might of worded that a bit better. When I...

    I might of worded that a bit better. When I said you was using the wrong formula, what I meant was you're using:


    cDegrees = (fDegrees-32)*(5/9);

    As Cat has previously noted, one of your...
  25. I was going to point out he was using the wrong...

    I was going to point out he was using the wrong formula and that he should also be using atof but you beat me to it. For the OP though, here are some other formulas you can use as well.

    C = (F -...
Results 1 to 25 of 96
Page 1 of 4 1 2 3 4