c++ - 无法在 visual studio 2010 中使用函数 posix_memalign

标签 c++ c visual-studio-2010 visual-studio

我正在尝试在 visual studio 中使用函数 posix_memalign,但它总是出现错误“posix_memalign':找不到标识符”

这是我的简单程序:

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(){
  double *pointer;
  int result;
  result = posix_memalign((void **)&pointer, 128, 128);
  printf("%d",result);
  getch();
}

最佳答案

Windows 不支持 posix。应该有您可以使用的 Windows API。

关于c++ - 无法在 visual studio 2010 中使用函数 posix_memalign,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29426533/

相关文章:

java - 理解 Kadane 的二维数组算法

模板内部类中的 C++ decltype

c++ - 提取 C/C++ 函数原型(prototype)

visual-studio-2010 - VS2010 中的 RDLC 网格线

c++ - 使用 curlpp 对 HTTP 服务器进行 GET 和 POST 调用

c++ - 错误 C2027 : use of undefined type GUITHREADINFO

c++ - 并行算法寻找K个最近点

c++ boost计算函数花费的时间

使用 C 将字符串中的所有其他字母字符更改为大写

c - 尝试释放结构元素时出现指针错误