MCPcopy Create free account
hub / github.com/daheige/rust-bible / interop_sort

Function interop_sort

part8/cc-cpp-demo/src/foo.cpp:13–18  ·  view source on GitHub ↗

实现函数interop_sort

Source from the content-addressed store, hash-verified

11
12// 实现函数interop_sort
13void interop_sort(int numbers[], size_t size) {
14 int *start = &numbers[0]; // 数组的第一个元素
15 int *end = &numbers[0] + size; // 数组的最后一个元素
16 // 从大到小进行排序
17 std::sort(start, end, [](int x, int y) { return x > y; });
18}

Callers 1

sort_from_cppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected