Open 38dh91 opened 7 months ago
Hi sorry I didn't respond - I had to miss this issue somehow.
I think you should do something like this:
slice := []int{1, 2, 3, 4, 5}
ptr := &slice[0]
convertedSlice := (*[5]int)(unsafe.Pointer(ptr))[:]
fmt.Println(convertedSlice)
I'll try to add it to cimgui-go
I've tried to add a generic version for that and there is a problem:
to add some iterator I need to know base type, when our type T
is in fact a pointer. I've tried to make it a base type and Data
field just a pointer to T
but I found out that it sometimes can be string
(char*
) and its quite difficult to find out what to do then.
I'll think about that
Good day!
I have a snippet of code like this:
Method
Tabs()
returnsVector
type and in my mind such type must have some type of iterator, but it isn't.Can you help me to realize how can I use this type to iterate over all
TabItems
inTabBar
?Thank you in advance!