Click here to Skip to main content
15,886,035 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Wordle 527 (4/6) Pin
musefan28-Nov-22 5:23
musefan28-Nov-22 5:23 
GeneralRe: Wordle 527 Pin
Cp-Coder28-Nov-22 10:11
Cp-Coder28-Nov-22 10:11 
GeneralI didn't expect... Pin
0x01AA27-Nov-22 0:03
mve0x01AA27-Nov-22 0:03 
GeneralRe: I didn't expect... Pin
OriginalGriff27-Nov-22 0:46
mveOriginalGriff27-Nov-22 0:46 
GeneralRe: I didn't expect... Pin
Gary R. Wheeler27-Nov-22 11:15
Gary R. Wheeler27-Nov-22 11:15 
GeneralRe: I didn't expect... Pin
OriginalGriff27-Nov-22 19:55
mveOriginalGriff27-Nov-22 19:55 
GeneralRe: I didn't expect... Pin
Daniel Pfeffer27-Nov-22 21:23
professionalDaniel Pfeffer27-Nov-22 21:23 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida27-Nov-22 12:13
jmaida27-Nov-22 12:13 
One of reasons I like just plain C. The addresses are right there to be manipulated. Dangerous but useful.
/*
Count the number times character 'c' is in the given string s with length m
Note: address of s is passed by value, as is c and m so pointer math is self contained within routine
this let me step through the string incrementing its address.
Loop ends when null character of string is reached (C strings need to have null terminator)
or count down reaches zero.
Faster than indexing the string as an array.
*/
int STR_CountChar( char *s, char c, int m )
{
int count;

count = 0;
if( s == NULL ) return( 0 );
while( *s && m-- )
{
if( *s == c ) count++;
s++;
}
return( count );
}
"A little time, a little trouble, your better day"
Badfinger

GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini27-Nov-22 21:39
mveCPallini27-Nov-22 21:39 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida28-Nov-22 6:55
jmaida28-Nov-22 6:55 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini28-Nov-22 10:41
mveCPallini28-Nov-22 10:41 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida28-Nov-22 14:41
jmaida28-Nov-22 14:41 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini28-Nov-22 20:33
mveCPallini28-Nov-22 20:33 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida29-Nov-22 6:40
jmaida29-Nov-22 6:40 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini29-Nov-22 2:05
mveCPallini29-Nov-22 2:05 
GeneralRe: I didn't expect... Pin
Super Lloyd27-Nov-22 13:01
Super Lloyd27-Nov-22 13:01 
GeneralRe: I didn't expect... Pin
honey the codewitch27-Nov-22 5:52
mvahoney the codewitch27-Nov-22 5:52 
QuestionRe: I didn't expect... Pin
CPallini27-Nov-22 7:09
mveCPallini27-Nov-22 7:09 
AnswerRe: I didn't expect... Pin
0x01AA27-Nov-22 7:47
mve0x01AA27-Nov-22 7:47 
GeneralRe: I didn't expect... Pin
DRHuff27-Nov-22 8:16
DRHuff27-Nov-22 8:16 
GeneralRe: I didn't expect... Pin
Randor 2-Dec-22 19:54
professional Randor 2-Dec-22 19:54 
GeneralRe: I didn't expect... Pin
11917640 Member 27-Nov-22 20:03
11917640 Member 27-Nov-22 20:03 
GeneralRe: I didn't expect... Pin
Daniel Pfeffer27-Nov-22 21:20
professionalDaniel Pfeffer27-Nov-22 21:20 
GeneralRe: I didn't expect... Pin
11917640 Member 27-Nov-22 22:15
11917640 Member 27-Nov-22 22:15 
GeneralRe: I didn't expect... Pin
Peter Somos27-Nov-22 22:46
Peter Somos27-Nov-22 22:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.