有谁能把C#帮忙翻译成C~~~

2025-04-12 22:54:55
推荐回答(2个)
回答1:

类floatmap2aligned

{

国际_w = 1,_h = 1,_stride = 0,_stridebits = 0;

浮[ ] _buf = null;

public int W { { } } _w得到回报;

public int H { { } } _h得到回报;

public int大步{得到回报_stride {;} }

public int stridebits { { } } _stridebits得到回报;

public int linestart(y)

{

返回y<<_stridebits;

}

公共floatmap2aligned(int,int H)

{

_w = W;

_h = H;

_stridebits = lowestgreater2pow(_w);

_stride=1<<_stridebits;

_buf =新的浮法[ _stride * _h ];

}

私有lowestgreater2pow(int x)

{

int i = 0;

在(x > 0)

{

x > > = 1;

+我;

}

还我;

}

回答2:

你确定这是C#??我怎么觉得是C++呢