西西河

主题:【原创】如何REVERSE一个C STRING? -- 老成都

共:💬30 🌺11
全看分页树展 · 主题 跟帖
家园 Does it really work?

Does your code really work?

Which compiler are you using and on which platform, Windows? Unix?

I tried your code using Visual C++ 6.0 on Windows and got an access violation for the following line as expected:

p[0] = p[0] + p[1];

Bigbug

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河