Search:

Type: Posts; User: Prelude

Page 1 of 20 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    2
    Views
    543

    Without specifying /platform, the default is...

    Without specifying /platform, the default is AnyCPU. So 64-bit is preferred, but 32-bit will be used when 64-bit is not available.
  2. Replies
    12
    Views
    4,070

    > Maybe I meant "non-standard" instead of...

    > Maybe I meant "non-standard" instead of "vendor-specific".

    Meh, the end result is the same: you can't depend on it being available or the same across compilers.

    > I bet different vendors DID...
  3. Replies
    6
    Views
    1,139

    Minor thoughts and nitpicks. > char...

    Minor thoughts and nitpicks.

    > char *my_strcat(char *a, char *b)

    Granted this is a custom strcat, but the signature doesn't match strcat. In particular, the second argument does not need to be...
  4. > The line looks like this: Which suggests...

    > The line looks like this:

    Which suggests that a naive approach will quickly become obsolete. The line you posted suggests a specific file format, and in my experience the very next requirement...
  5. Thread: sizeof struct

    by Prelude
    Replies
    2
    Views
    810

    Structures are typically padded with additional...

    Structures are typically padded with additional bytes for alignment purposes.

    Unless the structure members are sized and ordered with perfect alignment, or you go out of your way to pack the...
  6. Replies
    1
    Views
    864

    Using WinForms, I'd probably start with a user...

    Using WinForms, I'd probably start with a user control for each of the "records", a Person class that's populated from the database and acts as a data source for the user control, then use a flow...
  7. Replies
    5
    Views
    605

    Additionally, implementation defined and...

    Additionally, implementation defined and unspecified behavior may seem similar, but there's a key difference. With implementation defined behavior, the compiler must document its choice. With...
  8. Replies
    11
    Views
    2,599

    We are petty and immature. What's the problem...

    We are petty and immature. What's the problem again? ;)
  9. > void display(POINT); > void display(POINT p[])...

    > void display(POINT);
    > void display(POINT p[])

    Did you ignore errors and warnings when compiling? Because your declaration doesn't match the definition.
  10. Replies
    6
    Views
    1,148

    Use an output parameter? Use a special parameter...

    Use an output parameter? Use a special parameter to force the overload resolution? Use templates? Use implicit conversions via a wrapper class? Use a variant typed structure? Simulate your own...
  11. Replies
    4
    Views
    1,066

    > You don't need to initialize anything before...

    > You don't need to initialize anything before main is called if you dynamically allocate space when it's needed

    Again bringing us to the question of what the OP is trying to accomplish. If one...
  12. Replies
    4
    Views
    1,066

    > I want to have getch() and ungetch() without a...

    > I want to have getch() and ungetch() without a static buffer.

    Why, exactly? I ask because 1) it may not be necessary and 2) what you want to accomplish alters how you would go about it.

    > I...
  13. Rather than just look for a hard yes or no, I...

    Rather than just look for a hard yes or no, I think it would be a good thought experiment to ask "what else is there?" We know that algorithms are a thing, and data structures are a thing. They're...
  14. Replies
    17
    Views
    3,113

    > I've been lazy about buying the Standard to be...

    > I've been lazy about buying the Standard to be honest.

    Unless you're writing your own implementation, the freely available draft standard is sufficient.

    > "Obsolescent feature" is the kind of...
  15. Replies
    17
    Views
    3,113

    > I'd argue that EXIT_SUCCESS is equivalent, but...

    > I'd argue that EXIT_SUCCESS is equivalent, but is it strictly better?

    It's more of a programming style thing than any objective "betterness". I'd favor consistency though; if you use...
  16. Replies
    1
    Views
    758

    Sooo...you're reading a three line file with...

    Sooo...you're reading a three line file with fgets and incrementing count on each successful call of fgets, then printing the value of count. "Count = 3" being the output seems legit to me. Note here...
  17. Amazingly enough there is a standard getline,...

    Amazingly enough there is a standard getline, after a fashion. It's included in the TR 24731-2 extension which you activate by defining __STDC_WANT_LIB_EXT2__.
  18. Well, that's certainly a start...

    Well, that's certainly a start...
  19. Replies
    5
    Views
    951

    #error Bill Gates owns you! :D

    #error Bill Gates owns you!

    :D
  20. I'd be willing to bet that if you run in debug...

    I'd be willing to bet that if you run in debug mode, the failure will be when i reaches 1000. You're indexing the array before checking the validity of the index. A loop along these lines would work...
  21. Replies
    5
    Views
    3,979

    > Why is the scanf %d and not %i?? Ooh, good...

    > Why is the scanf %d and not %i??

    Ooh, good question! I used %d because it's more specific to the needs. %d accepts a decimal value only, which when representing dates is universal. %i allows for...
  22. Thread: Deadlines

    by Prelude
    Replies
    39
    Views
    4,308

    > How do you guys handle these situations? ...

    > How do you guys handle these situations?

    That's a project management issue. Changes to the requirements inherently alter the deadline, and there should be a change request to document it. If...
  23. Replies
    5
    Views
    3,979

    > I am having a problem figuring out how to get...

    > I am having a problem figuring out how to get the leap year into this...

    Someone once said that if you think date-time programming is easy, you haven't done much of it. ;) The good news is that...
  24. Replies
    21
    Views
    2,286

    Oh goodness, my memory isn't that good. DOS...

    Oh goodness, my memory isn't that good.

    DOS
    Windows 3.1
    Windows 95
    Windows 98
    OS/2 Warp
    Windows ME
    Red Hat Linux
    FreeBSD
  25. Replies
    1
    Views
    797

    Your key is compared as a pointer, not a string....

    Your key is compared as a pointer, not a string. Unless it's the same pointer used for count as was inserted, the lookup will fail. You could add a comparison delegate to make things work, but it...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4