Search:

Type: Posts; User: Aerie

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    1,558

    Hah, hah. Yeah, I know I could have scraped by...

    Hah, hah. Yeah, I know I could have scraped by doing that, but I wanted to address a slightly more interesting problem, wherein "blanks" is defined as "any whitespace."

    (Of course, I'm also the...
  2. Replies
    11
    Views
    1,558

    I replaced each 3 with (TAB2SPACE-1) and ran it...

    I replaced each 3 with (TAB2SPACE-1) and ran it again... the results were even more hideous.

    Edit: Uh, nevermind. That was me being stupid and re-copying the code, fixing the numbers, but...
  3. Replies
    11
    Views
    1,558

    Dave: Let me look at the code again. I only...

    Dave: Let me look at the code again. I only changed the define, assumed that would take care of things. Seems kind of stupid to post a solution where you put the magic number in a define, then go and...
  4. Replies
    11
    Views
    1,558

    Uh, itsme, I infered from the way the surrounding...

    Uh, itsme, I infered from the way the surrounding text was written that this program was supposed to be able to accept any input and convert it appropriately... including indiscriminately mixed tabs...
  5. Replies
    11
    Views
    1,558

    Neither solution on that page work, Dave. I...

    Neither solution on that page work, Dave.

    I changed the defines for TABSTOP and TAB2SPACE to 8 and compiled both and they totally didn't work.

    Edit: they work till you do things like
    " ...
  6. Replies
    11
    Views
    1,558

    The exercise is from K&R: Write a program that...

    The exercise is from K&R:
    Write a program that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing.

    It also asks whether a space or a tab should be...
  7. Replies
    11
    Views
    1,558

    EOF is my nemesis

    I was playing around with a particular solution to the exercise to create a program that would convert whitespaces to tabs, when possible, preserving the original appearance of the text.

    TABSTOP...
  8. Replies
    5
    Views
    2,744

    http://faq.cprogramming.com/cgi-bin/smartfaq.cgi...

    http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

    The exact question you asked is in the FAQ.
  9. Replies
    5
    Views
    2,744

    Because scanf interprets space-separated strings...

    Because scanf interprets space-separated strings as different input arguments. This short and horrible program demonstrates what I'm talking about:
    If you type "abcdefg 123456 ABCDEFG" when the...
  10. Replies
    5
    Views
    2,744

    The whole idea with functions is that you simply...

    The whole idea with functions is that you simply know how to call them(ie., what type they are, what data they ask for, what they do with that data, what values they return for which circumstances),...
  11. Replies
    15
    Views
    3,188

    Understood... but I'm still unsure under what...

    Understood... but I'm still unsure under what conditions charbox[i] wouldn't end up being '\0', since there is an explicit line(not inside a loop or if conditional -- is 'explicit' the correct term...
  12. Replies
    15
    Views
    3,188

    And come to think of it, there is an unqualified...

    And come to think of it, there is an unqualified line that sets charbox[i] to '\0', and since i should never go below 0, and shouldn't ever be incremented beyond bounds, I thought that there wasn't...
  13. Replies
    15
    Views
    3,188

    The only time I can see it not containing a '\0'...

    The only time I can see it not containing a '\0' is when it's empty anyway, in which case the return value specifies that the contents are to be ignored.

    I can code it to make SURE there is ALWAYS...
  14. Replies
    15
    Views
    3,188

    A little context, please. I'm probably just...

    A little context, please.

    I'm probably just being dense, but I don't see what you're hinting at.
  15. Replies
    15
    Views
    3,188

    Here, by the way, is the solution I came up with...

    Here, by the way, is the solution I came up with for the exercise in question... It's really a step backwards for me in terms of actual information, these early chapters, but I'm learning all sorts...
  16. Replies
    15
    Views
    3,188

    This is probably ugly and awful, but I tried to...

    This is probably ugly and awful, but I tried to write a variant version of getline that would operate the same way as far as the program calling it was concerned, but was a little more robust.

    I...
  17. Replies
    3
    Views
    3,798

    I dunno much about linking and multiple files,...

    I dunno much about linking and multiple files, but why aren't these arrays of pointers to string constants? Seems you're wasting a lot of array space here, when you could just have
    const char...
  18. Replies
    15
    Views
    3,188

    Oh, I see. I guess I stared at it so long I...

    Oh, I see. I guess I stared at it so long I totally stopped seeing what was going on, and was seeing some bizarre internal representation of what I thought was going on.

    Thanks for explaining it...
  19. Thread: Time Calculating

    by Aerie
    Replies
    2
    Views
    1,303

    First, USE CODE TAGS. Put [ code ] in front of...

    First, USE CODE TAGS. Put [ code ] in front of any code you type, and [ /code ] (both without the spaces) after it. This makes it more readable and is good manners.

    Second, you're dividing number...
  20. Replies
    15
    Views
    3,188

    That comes in under "exactly when c is examined."...

    That comes in under "exactly when c is examined."

    See, the way I've always had for loops explained to me is that the process occurs like this:
    -If first iteration, perform initialization
    -Check...
  21. Replies
    5
    Views
    1,128

    I'd been meaning to ask this exact question(well,...

    I'd been meaning to ask this exact question(well, I thought that's how it worked, but I wanted to make sure it was okay).
  22. Replies
    15
    Views
    3,188

    I kind of figured that out. However, not knowing...

    I kind of figured that out. However, not knowing much about how the underlying model of buffered input works(ie., at what points the value of c will be checked, and what that value will be at that...
  23. Replies
    15
    Views
    3,188

    Question about K&R program

    After having been busy a couple months, I'm going back through K&R to get back in the habit of typing C, and to get used to the conventions/syntax, etc... so I can pick up where I left off again...
    ...
  24. Replies
    4
    Views
    3,546

    And according to self-same chart, postfix...

    And according to self-same chart, postfix increment operators are higher priority, which confused me. However, since you've outlined this and indicate that ++ is in this case acting as a prefix...
  25. Replies
    4
    Views
    3,546

    I thought that postfix increment or decrement...

    I thought that postfix increment or decrement were both really low priority; according to that chart, they're really high priority.

    Am I confused about something here?

    I guess my question is:...
Results 1 to 25 of 117
Page 1 of 5 1 2 3 4