المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Stripping new line problem



C++ Programming
02-22-2011, 04:10 AM
OK, here is a func i wrote for stripping new lines:

wchar_t * StripNL(IN wchar_t *buff)
{
int len = wcslen(buff);
wchar_t *temp = (wchar_t *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(wchar_t *) * len + 1);
int x = 0;

for (int i = 0; i <span class="code-keyword">