Click here to Skip to main content
15,911,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Most optimized way to reverse a string? Pin
Anonymous27-Nov-03 5:13
Anonymous27-Nov-03 5:13 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn27-Nov-03 5:24
melwyn27-Nov-03 5:24 
AnswerRe: Most optimized way to reverse a string? Pin
Ian Darling27-Nov-03 5:37
Ian Darling27-Nov-03 5:37 
AnswerRe: Most optimized way to reverse a string? Pin
Mike Dimmick27-Nov-03 6:23
Mike Dimmick27-Nov-03 6:23 
GeneralRe: Most optimized way to reverse a string? Pin
Obliterator27-Nov-03 6:39
Obliterator27-Nov-03 6:39 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn28-Nov-03 0:08
melwyn28-Nov-03 0:08 
AnswerRe: Most optimized way to reverse a string? Pin
фил4-Dec-03 21:57
фил4-Dec-03 21:57 
GeneralRe: Most optimized way to reverse a string? Pin
melwyn7-Dec-03 20:08
melwyn7-Dec-03 20:08 
Nice. Smile | :)
Actually the initial problem required the original string to be reversed (which i forgot to mention). I have used your nice logic to modify my function Smile | :)

void Reverse(char *src)<br />
{<br />
	char *p = strchr(src, '\0') - 1;<br />
	<br />
	while (src < p)<br />
	{<br />
          *src ^= *p ^= *src ^= *p;<br />
	  src++;<br />
	  p--;<br />
	}<br />
}


-Melwyn
Questionwitch message? Pin
willempipi27-Nov-03 4:33
willempipi27-Nov-03 4:33 
AnswerRe: witch message? Pin
Johnny ²27-Nov-03 4:54
Johnny ²27-Nov-03 4:54 
GeneralRe: witch message? Pin
willempipi27-Nov-03 5:45
willempipi27-Nov-03 5:45 
GeneralRe: witch message? Pin
Ravi Bhavnani27-Nov-03 6:58
professionalRavi Bhavnani27-Nov-03 6:58 
GeneralRe: witch message? Pin
melwyn27-Nov-03 20:21
melwyn27-Nov-03 20:21 
GeneralDLL Help Pin
Obliterator27-Nov-03 3:59
Obliterator27-Nov-03 3:59 
GeneralRe: DLL Help Pin
melwyn27-Nov-03 4:20
melwyn27-Nov-03 4:20 
GeneralRe: DLL Help Pin
Obliterator27-Nov-03 4:57
Obliterator27-Nov-03 4:57 
GeneralRe: DLL Help Pin
Mike Dimmick27-Nov-03 6:30
Mike Dimmick27-Nov-03 6:30 
GeneralRe: DLL Help Pin
Obliterator27-Nov-03 6:36
Obliterator27-Nov-03 6:36 
GeneralRe: DLL Help Pin
melwyn27-Nov-03 23:30
melwyn27-Nov-03 23:30 
GeneralRe: DLL Help Pin
Obliterator28-Nov-03 3:03
Obliterator28-Nov-03 3:03 
QuestionHow to set the &quot;Dialog Focus&quot; in Dialog Based Application Pin
eshban28427-Nov-03 3:42
eshban28427-Nov-03 3:42 
Generalminimize windows in system tray Pin
Otty27-Nov-03 3:00
Otty27-Nov-03 3:00 
GeneralRe: minimize windows in system tray Pin
Johnny ²27-Nov-03 3:10
Johnny ²27-Nov-03 3:10 
GeneralRe: minimize windows in system tray Pin
tn_dang22-Apr-04 3:37
tn_dang22-Apr-04 3:37 
Questionhow to set the &quot;CBS_DROPDOWN &quot; or &quot;CBS_DROPDOWNLIST &quot; to the combobox? Pin
benben27-Nov-03 2:41
benben27-Nov-03 2:41 

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.