Message from C, C++ talks

July 2019

— And could that work as other way?

— Nope

— And where can I find more info about these stuff

— #define MANY(T,N) (T*)malloc(sizeof(T)*(N))
char* nospace(char const* str){
size_t len = strlen(str);
char* ret = MANY(char, len);
char* dest = ret;
for(;*str;++str){
if( *str!=' ') *dest++=*str;
}
*dest=0;
return ret;
}

Message permanent page

— 

While just iterate throw str[], so if u change condition, it just increase or reduce count of iterations, that's all
and ur problem is in str2[] array

— Thanks!

— .

— 🌚more defines..

— Void ripspace(char* str){
char* dest = str;
for(;*str;++str){
if( *str!=' ') *dest++=*str;
}
*dest=0;
}

Message permanent page

— He already write this kind of solution one hour ago

— Segfault

— Core dump

— Why?

— Boh

— Or not. I'm not sure