Message from C, C++ discussions

November 2019

— Okay I´ll look into it...

— 

The comparator function takes two pointers as arguments (both type-casted to const void*) and defines the order of the elements by returning (in a stable and transitive manner
reinterpret_cast

— Okay and you want to sort the strings alphabetically

— Then you could do...

— Yea its just a function i pass as a parameter in the qsort function

— Const void pointers are needed in this case

— I tried it other ways and the compiler told me to get the hell out here with that

— My pc crashed gimme a sec 😂

— Wait... why do you write a custom compare functor shouldnt that work:

qsort(array, array_len, sizeof *array, strcmp);
?

Message permanent page

— And I need the opinion of your folks: I´m currently working on my own "programming language" which is basically a language which my compiler then converts to c++, which then is compiled into an executable using clang. Is it still legit to call it a programming language - because it runs on C++?

Message permanent page

— Nope, since the signatures are different

— So I can call it a own language?