Search:

Type: Posts; User: Metalix

Search: Search took 0.03 seconds.

  1. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    Okay, I understand now. Thanks.

    Okay, I understand now. Thanks.
  2. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    I understand. But what about the function...

    I understand. But what about the function prototype?
  3. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    Thanks, there were some obvious problems there -...

    Thanks, there were some obvious problems there - most shamefull, thanks for pointing them out.

    But I don't understand why I would pass the file pointer as a non-pointer. Why?
  4. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    I see. Should I pass is as so: write...

    I see. Should I pass is as so:

    write (**OutfilePtr, Chargroup);

    And take away the const declaration in the prototype?
  5. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    Of course. I'm sorry. I've pinpointed the...

    Of course. I'm sorry.

    I've pinpointed the problem to the write functions. The compiler says there's a parse error on lines with Chargroup or filepntr.
  6. Thread: More trouble

    by Metalix
    Replies
    12
    Views
    1,585

    More trouble

    Hi, I'm having another episode with function parameters, but I've included the source files.

    Thanks for your help.


    /* Write - This module writes an array of 60 converted characters into */...
  7. Replies
    9
    Views
    53,962

    I've always kept my function bodies in .h files...

    I've always kept my function bodies in .h files and included them as modules in my main.c file. I understand this is bad practise. Do I declare the function prototype in the header file, and then use...
  8. Replies
    9
    Views
    53,962

    So, is it good practise to prototype your...

    So, is it good practise to prototype your functions in header files? I've gotten away with it enough.

    a.h:

    void function();


    a.c
    void function(int *parameter)
    {
  9. Replies
    9
    Views
    53,962

    Difference between .h and .c files

    What's the difference between a .c file and a .h file? I though .h was just for modules, but I hear people calling it header files. Also, everyone seems to have .h .c files for each module.

    What's...
  10. Replies
    10
    Views
    7,265

    Thanks alot for your answers!

    Thanks alot for your answers!
  11. Replies
    10
    Views
    7,265

    That's cool, but I wanted to invert the letters....

    That's cool, but I wanted to invert the letters. Ie. A becomes Z, b becomes y.
    You know what I mean?
  12. Replies
    10
    Views
    7,265

    "Inverting" ASCII characters

    Hi,

    I want to invert some ASCII characters, ie, A becomes Z, z becomes A, etc.

    Would anyone be able to point me to a simple ASCII chart or give me some suggestions?

    Thanks,

    Lewis
  13. Replies
    21
    Views
    8,835

    I see, that's a good point. I actually thought...

    I see, that's a good point. I actually thought that EOF was a special character, but I see it's a macro.

    Thanks again.
  14. Replies
    21
    Views
    8,835

    Yeah, cheers mate, that did the trick. Ah,...

    Yeah, cheers mate, that did the trick.

    Ah, it's amazing, a few weeks ago I thought I knew it all with C, but these dynamic parameters are a totally new challenge for me, and yet again, it's the...
  15. Replies
    21
    Views
    8,835

    I haven't tried it yet (on another machine), but...

    I haven't tried it yet (on another machine), but I think you've hit it spot on.

    Thanks!
  16. Replies
    21
    Views
    8,835

    It doesn't seem to answer my questions. See, I...

    It doesn't seem to answer my questions. See, I can't see what I'm doing wrong. I passed the parameter as a pointer to a pointer, I gave the function the address, why would it be giving me an...
  17. Replies
    21
    Views
    8,835

    Another one

    Thanks for the help. The functions for opening my files now run as sweet as a nut! :D

    I've encountered a similar problem though. When I try to use a double pointer for a function that reads the...
  18. Replies
    21
    Views
    8,835

    So, in theory it's used as: int Variable;...

    So, in theory it's used as:

    int Variable;
    int *Pntr;
    int **Pntr2Pntr;

    Pntr = &Variable;
    Pntr2Pnr = &Pntr;
  19. Replies
    21
    Views
    8,835

    Okay, thanks alot. I know this sound's very...

    Okay, thanks alot.

    I know this sound's very stupid, but I'm not quite aware what two stars mean. Is that a pointer to a pointer? or what?

    Thanks.
  20. Replies
    21
    Views
    8,835

    File pointers as function parameters

    Hey,

    I'm trying to pass some file pointers as function parameters but I'm having a little trouble with it.

    Say, I pass the pointer to a function to open my file:

    openF(&FilePntr, argv);

    ...
Results 1 to 20 of 20