我正在使用Ariel Faigon的排序库,可在此处找到:http://www.yendor.com/programming/sort/
我能够让我的所有代码都在Linux上运行,但不幸的是,当尝试在Mac上使用GCC进行编译时,它的默认stdlib.h包含另一个heapsort,不幸的是会导致类型冲突的错误.
以下是Apple heapsort的手册页:http: //developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/heapsort.3.html
在排序库头文件中注释掉堆会导致一大堆问题.(原谅双关语)
我还简要地想过评论我对stdlib.h的使用,但是我使用了malloc和realloc,所以根本不会工作.
有任何想法吗?
这是导致Firefox和Chrome出错的整个文档:
<!DOCTYPE html>
<html>
<head>
<script>
var strs = [], scripts = ['harbl.js'], s = 0;
strs.push('<script src="' + scripts[s] + '"></script>');
</script>
</head>
<body>
<p>buh...</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/cryptoquick/J4zZT/
我得到的错误是:
Uncaught SyntaxError: Unexpected token ILLEGAL
Run Code Online (Sandbox Code Playgroud)
这让我很困惑.