Re: [Dev-C++] Reversing a string word by word - advice on my code please
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-12-12 10:17:36
|
1: What happen if string starts with a space? 2: Why not reverse each word inplace instead of needing an extra string? while word length > 1 swap first and first + length - 1 increment start pos decrement word length with 2 /Per W |