Message from C, C++ talks

July 2019

— No, you're responsible to check

— No

— This depends on what are u really write

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

Message permanent page

— 

Assume it's a library, and it's doc says you need to check all NULL's if you don't want sudden segfaults

— Bad solution for library

— 

if (!str) return;

— Where is a problems?

— No, the caller is responsable

— You would encounter problems if you try to write something with that kind of lib :)

— Stdlib from C doesn't check anything

— At most, the called will make assert

— It's... not very modern you know.

— You can code with python

— As i said early, that depends on whar are you really want