English 中文(简体)
添加功能(erf()和erfc()至数学.h——C基本要素。
原标题:Adding functions erf() and erfc() to math.h _ basics of C .

我正与Borland Turbo C++编辑公司合作,使用WINDOWS机器,并在C撰写一部法典。

我想在我的计算中利用互补的错误功能。

However, when I run the code, the error is "Linker error: Undefined symbol _erfc in in module filename.c "

The problem here is erfc() and erf() are supposed to be included in the math.h library. However, these aren t available in mine.

请允许我告诉我,我如何能够将这些职能纳入我的方案?

谢谢。

最佳回答

很可能需要通过某种特殊选择,与数学图书馆连接。

Borland Turbo C++还可能支持erfc(功能。

在C,1990年ISO C标准t包括erfc(功能。 根据1999年的标准,在语言中添加了该词。 (不确定C++。) 我认为Borland Turbo++相当老。

起草一个称为<代码>sqrt(<>>/code>的小型方案。 如果你能够工作,<代码>erfc(>>仍然得不到承认,那么Borland不支持。

In the latter case, either get a newer compiler (there are a number of free ones, and that s probably a good idea in any case), or find an open source implementation of erfc().

问题回答

你需要与数学图书馆联系。 在特殊机器上,通过<代码>-lm向联系人悬挂国旗,这意味着与一个名为校准的图书馆连接。 对博兰来说,或许需要做一些类似的事,但我不相信细节。 希望这将使你走到正确的方向。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签