07-09-2008, 15:57
|
|
|
חבר מתאריך: 30.10.04
הודעות: 151
|
|
לא עברתי על התגובות כאן אבל הנה פיתרון שלי:
קוד:
void strReverse(char* src,char* target)
{
for(int i=0; src[i]!='\0'; i++)
{
for (int j=i; j>0; j--)
{
target[j]=target[j-1];
}
target[0] = src[i];
}
}
עריכה: לא שמתי לב שצריך ברקורסיה.
_____________________________________
Your signature did not follow Fresh's signatures policy, therefore it was automatically erased. Please see the E-Mail which has been sent to you, to learn how to fix this.
נערך לאחרונה ע"י PhoenixBoy בתאריך 07-09-2008 בשעה 16:04.
|