rttr icon indicating copy to clipboard operation
rttr copied to clipboard

how to get start address of vector's first element ?

Open bruceauyeung opened this issue 5 years ago • 0 comments
trafficstars

i have already registered like this:

	registration::class_<std::vector<char*>>("std::vector<char*>")
		.constructor<std::vector<char*>::size_type>()
		(
			policy::ctor::as_std_shared_ptr
		);

and then i created a vector and assign each element like this:

type charPtrArray = type::get_by_name("std::vector<char*>");
auto charPtrArrayInst = charPtrArray.create({ size });
auto charPtrArrayInstView = charPtrArrayInst.create_sequential_view();
int i = 0;
for (const auto& item : view)
{
	charPtrArrayInstView.set_value(i, item.second.extract_wrapped_value().to_string().c_str());
	i++;
}

now how can i get start address ( expecting const char ** ) of the underlying vector of charPtrArrayInst ?

@acki-m please help me out, thanks a lot!

bruceauyeung avatar Apr 30 '20 03:04 bruceauyeung