Search:

Type: Posts; User: joemccarr

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Pelles C

    by joemccarr
    Replies
    11
    Views
    5,720

    I would recommend code:blocks. It runs on windows...

    I would recommend code:blocks. It runs on windows and linux and you can debug your code in the ide.
  2. i is declared twice also.

    i is declared twice also.
  3. Replies
    6
    Views
    10,723

    I will try not to look but I am not the most...

    I will try not to look but I am not the most disciplined person in the world.

    I am pretty sure that the way I was using malloc etc. is not the way
    to use it (i.e. for each string) as there is...
  4. Replies
    6
    Views
    10,723

    @Salem, thanks for that explaination. That was...

    @Salem, thanks for that explaination. That was not explained in the text book I'm going through. At least not yet.


    I see now how it would overflow now because of the added null character. Is...
  5. Replies
    6
    Views
    10,723

    Trying to understand malloc, calloc

    I am learning to use malloc & calloc.
    I am using strlen with calloc to store the string in memory.
    First thing is that I did not expect is that malloc is reserving 32 bytes for the string instead...
  6. Replies
    2
    Views
    1,680

    Yes, that way is better for using more...

    Yes, that way is better for using more descriptive variable names.

    I have not seen this use before "xA23456789TJQK"[hand[i].value] but I like it. Just a substitution.

    Thanks for your help. ...
  7. Replies
    2
    Views
    1,680

    Having trouble returning pointer to div_t

    I am getting this error when compiling- Operands of '=' have incompatible types 'div_t [5]' and 'div_t *
    I have played around with different ways of getting rid of this error but to no avail. Any...
  8. Replies
    28
    Views
    13,952

    I don't see how you are going to get the line...

    I don't see how you are going to get the line numbers in front of the lines any other way.

    If your tutor has a sense of humor, you can try this ...



    while((c=getchar())!=EOF)
    if ( c...
  9. Replies
    28
    Views
    13,952

    Understood, thanks

    Understood, thanks
  10. Replies
    28
    Views
    13,952

    Not sure if I follow, your saying to use '0'...

    Not sure if I follow, your saying to use '0' because it shows that I am intending to manipulate ASCII ?
  11. Replies
    28
    Views
    13,952

    --------------------------------------------------...

    -----------------------------------------------------------------

    Well its not that simple of a problem if you are just starting out with C.
    The parts to finish this are in the responses you got.
  12. Replies
    28
    Views
    13,952

    Because I meant add 48 to the int to get to the...

    Because I meant add 48 to the int to get to the correct ascii number.
  13. Replies
    28
    Views
    13,952

    That's correct, I didn't want to give him the...

    That's correct, I didn't want to give him the whole answer just something to get him going in the right direction
  14. Replies
    28
    Views
    13,952

    Ouch !

    Ouch !
  15. Replies
    28
    Views
    13,952

    You could use something like this, which is what...

    You could use something like this, which is what Salem was talking about.
    For displaying line #s 1 - 9 ...




    if ((linenum > 0) && (linenum < 10)){
    putchar('0');
    ...
  16. Replies
    28
    Views
    13,952

    I'd call him again. It kinda looks like the...

    I'd call him again. It kinda looks like the number of local & global variables is not constant ; )
  17. Replies
    28
    Views
    13,952

    Here's a hint Use this in your while loop to...

    Here's a hint

    Use this in your while loop to store the input characters.

    mystring[i++]=c;

    At the end of your program you want to print out this string but with the line numbers in front.
  18. Replies
    5
    Views
    7,832

    Thanks Salem, that makes sense.

    Thanks Salem, that makes sense.
  19. Replies
    5
    Views
    7,832

    Actually it was a warning, not an error. So I...

    Actually it was a warning, not an error.
    So I ran the program and it was able to excute the line that was flagged in the warning.

    I am using Pelles compiler, so I posted on their forum.
  20. Replies
    5
    Views
    7,832

    "Unreachable Code" error

    I get the above error. Compiler doesnt like the highlighted lines floor-0;
    below. My question is why would this be unreachable ?


    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    ...
  21. Replies
    14
    Views
    16,123

    Pelles C has an IDE with Bult-in Debugger. I...

    Pelles C has an IDE with Bult-in Debugger. I used to work as an engineer and we made custom motherboards specific to what we did with no operating system. We didnt even use a debugger. We used an...
  22. Replies
    2
    Views
    1,716

    That is an excellent site, thanks

    That is an excellent site, thanks
  23. Replies
    2
    Views
    1,716

    Reference with Examples

    Happy Monday all,

    There is a ton of references on the C library and language on the web.
    What I have been having a difficult time is finding one that has examples along with it. Sometimes I have...
  24. Replies
    6
    Views
    3,039

    How about this, just uses inter math. If the...

    How about this, just uses inter math.
    If the division return zero then you know the number does not take up that place holder

    6294/1000=6

    6294-6*1000= 294 subtract last result...
  25. Replies
    2
    Views
    6,004

    Yes, what she said.

    Yes, what she said.
Results 1 to 25 of 33
Page 1 of 2 1 2