You could easily buy a C# book and work through it...e.g., O'Reilly's Head First book on C#, or one of the Apress books. Why not? It's not like you're going to fill up your brain and have no room...
Type: Posts; User: monk64
You could easily buy a C# book and work through it...e.g., O'Reilly's Head First book on C#, or one of the Apress books. Why not? It's not like you're going to fill up your brain and have no room...
I liked the HeadFirst C# book from O'Reilly a lot. Make sure you get the most recent edition.
At least, I think that's what I think I want to wrap my head around ;-)
Brief problem statement: How can I write a method signature in a base class that returns a different type depending on the...
I have some code where I want to do a for loop, iterating over a fixed set of integers. Unfortunately, the set isn't in any incrementalable order - e.g., it's something like
{ 10, 14, 23, 25 }
...
I have a program that reads about 10K of data. This data will never change. It's all constants, etc.
So it seems I have these options:
I could just include a ".dat" or ".txt" file with the...
Is it possible to "return" a string from a function-like macro? I know macros don't really "return" things, but is it possible to have the macro evaluate to a string?
For example, I have some...
I wrote a quick function to trim trailing spaces on a string without generating a new string...
void rtrim (char * s ) {
int end;
end = strlen(s) - 1;
if (end >= 0 && s[end] == '\n')
...
Ah, of course. tabstop, you make it so simple. Call the function if DEBUG_WANTED, otherwise it's just define'd to blank.
Thanks much.
This is code for the C99 standard (gcc on linux).
What I'm trying to do: Write a macro like DEBUG ("some message") that I can drop into code and will only be compiled in if DEBUG_WANTED (or...
Bravissimo! That is it. Replacing "1" with "1ULL" fixed it. Makes complete sense.
Thanks much - this was quite educational.
I thought so, too, but...well, perhaps I have a different problem. I am writing code on 32-bit linux. According to all docs I can find, unsigned long long ints are guaranteed to be 64 bits.
$...
I know, I know, inside the software, a number is a number. But here's my problem...
I want to do something like this:
for (i=0; i<=63; i++) {
if ( ( flags & (1 << i ) ) != 0 )
...