Open gitboy16 opened 2 years ago
As described on Discourse, this question is somewhat ill-posed, i.e. there are details missing. Calling C++ requires handling many low-level details, and you still need to handle them when you call C++ from Julia. Such questions are:
std::shared_ptr
or std::unique_ptr
?If you are thinking of an existing C++ library, then looking at the library's API might help answer these questions.
If you are unfamiliar with the questions above, then some higher-level questions might help determine the answers:
std::vector
and std::string
? (Or are these actually C types, as in const char *vec[10]
?I'll try to answer your questions but if you need more information please let me know.
-Julia creates/allocates the vectors
-The vectors are passed to C++ for processing and then sent back to Julia for more processing. Once sent back to Julia, C++ does not need to keep these vectors.
-The library handles std::vector<std::string>
types only.
Thank you
Hi, thank you for the package. Someone mentionned your package: https://discourse.julialang.org/t/ccall-c-sort-vector-of-string/74635/21
I was wondering if you would be able to provide a simple example (step by step) on how to sort a vector of strings using c++
std::sort
. Thank you