Without specifying /platform, the default is AnyCPU. So 64-bit is preferred, but 32-bit will be used when 64-bit is not available.
Type: Posts; User: Prelude
Without specifying /platform, the default is AnyCPU. So 64-bit is preferred, but 32-bit will be used when 64-bit is not available.
> 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...
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...
> 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...
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...
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...
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...
We are petty and immature. What's the problem again? ;)
> void display(POINT);
> void display(POINT p[])
Did you ignore errors and warnings when compiling? Because your declaration doesn't match the definition.
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...
> 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...
> 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...
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...
> 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...
> 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...
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...
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__.
Well, that's certainly a start...
#error Bill Gates owns you!
:D
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...
> 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...
> 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...
> 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...
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
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...