It's just another way to skin the cat; it's not criticism.
Type: Posts; User: Deckard
It's just another way to skin the cat; it's not criticism.
I suppose you could always start at the NULL and work your way back to the first occurance of the slash and save yourself the function call (not that there's anything wrong with calling strrchr()).
It's not too late to switch majors.
If you post what you've got so far, and explain where you're stuck, we can help you out.
The answer depends upon what environment you're using. Look into the ncurses library if you're on *nix.
" Source in your custom filetypes as given below -
so $HOME/.vim/myfiletypes.vimThat looks suspicious. Could it be overriding the vim defaults? Also, try :help from within vim. If that doesn't work,...
I have my system setup to do just that. Here's the .vimrc from my home directory:
" .vimrc
" Last updated August 14, 2005 by jdeckard
set shiftwidth=3
set shiftround
set expandtab
set...
Also, Wraithan provides much faster answers than I do ;)
Playing around is a great way to learn.
It looks like you're trying to return lpBits:
return lpBits;...and you already know what it is:
BYTE *lpBits = malloc(size);...so, should...
The sign bit isn't a factor in this situation.
However, as a general rule (and to benefit those who may not know why), sure: use unsigned integers when using integers as bit fields. Why? Because...
Here's a rough draft that goes backwards and always displays a fixed length field, but it should help:
void printSubsets( int range )
{
int index;
int field; /* assuming 26-bits or more...
pinfun() keeps calling itself until i > n*n, incrementing x by three each time. By the time i is larger than n*n, x is larger than the number your user entered. That becomes a factor the first time...
I've never thought about it before. To be honest, I don't think of my thoughts as images or words. They're "just there". It's probably a linked list gone horribly wrong.
I do know that when I'm...
Perhaps you could post the source that gcc doesn't like. I suspect you've specified main with a return type of void.
EDIT: Oops, problem solved a good ten minutes ago :rolleyes:
sys_execve (11)
fork() returns the process identifier of the child to the parent and zero to the child itself. fork() will return -1 if an error occurs, which is always good to know about. Call fork() and test the...
Correct, and it doesn't change the flow of execution. I'm sure you can guess what command takes you back down the stack.
You just need to go "up" in the stack to bring ptr back in scope.
jdeckard@bender ~/test $ cat gdbfun.c
void myfunc( void )
{
int x;
x = 1 + 1;
}
I'm glad to see you've got it figured out. For what it's worth, there's nothing wrong with tracking the remaining number of cups with x or cups (no need for y).
*cups = x;
*cups -=...
Your variables for gallons, quarts, pints, and cups are not always given a value before you print them.
-----
Bonus hint:
if ( expr )
statement;
statement;
is not the same as
If the legacy code returns value to your code (and I don't know if it does), would it make sense to keep the second table in your new code? You could get the result of the first table by calling the...
I'd like to get a better understanding of why the legacy function won't work for you as-is. I'm guessing that you've decided index_table needs to be an array of function pointers because it solves a...
It would help to post the errors.
if ( sscanf( buff, "%d/%d/%d", &d, &m, &y ) == 3 ) {
/* got 3 ints */
if ( d >= 1 && d <= 31 ) /* etc etc */
}This is a problem. The...
If you don't mind using the Microsoft Foundation Classes (and C++, for that matter), take a look at OpenProcess(), ReadProcessMemory(), and WriteProcessMemory().
I believe we have a system at over 400 days, but I happened to be on this box at the moment.