Message from C, C++ talks

July 2019

β€” To test I'm using as argv[1] ABABABAAABAA to check if A's are converted to B's

β€” It doesn't work, because "A" and 'A' are whole diff things

β€” Another one bites the dust...!
Banned SamuraiLeon $3 πŸ§πŸ§πŸ§πŸŒŠπŸ”.
Reason:
What the hell

β€” That bot are scaring me

β€” 

Why do you test replacement if you want to delete spaces?
I would just create second array where to copy non-space symbols from the initial.

β€” Ok, I'll try to do that

β€” Thanks all of you for helping!

β€” Useless syscall using

β€” But it's simple

β€” Also I can use stack-base array.
He is using one.

β€” No syscalls.

β€” If we have a limitation to not use second array, algo will be:
1. Find space
2. Count how many spaces till non-space
3. memmove from non-space to first space position.
4. Loop 1-3 till the end of string.

Message permanent page

β€” Just for fun

#include <iostream>
#include <algorithm>

int main(int ac, char **av)
{
char str[] = "qweqweqeqw qwe qw wq eq";

std::string obj(str);
obj.erase(std::remove(std::begin(obj), std::end(obj), ' '), std::end(obj));
std::cout << obj << std::endl;
return(0);
}

Message permanent page

β€” Std-cheater

β€” Std:: in our hearts❀️