I want to use C library in Go. In order to execute C function I need to create C struct. I do it as follows:
package main
/*
#include <stdint.h>
typedef struct
{
std::uint16_t x;
std::uint16_t y;
} HeliosPoint;
*/
import "C"
import "fmt"
func main() {
fmt.Println("hello world")
}
When I execute the code I got an error:
./main.go:8:2: error: expected specifier-qualifier-list before ‘std’
8 | std::uint16_t x;
| ^~~
How should I modify my code to use above struct?