Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在定义一个真实类型,并且我使用 strtod 进行指数方式,即使未经测试也不知道它是否有效,但更重要的是,我想知道是否有任何内置函数,如 strtod 用于工程符号如果没有,我该怎么做?
在此先感谢,马丁
scanf()使用%gor格式说明符怎么样%G(取决于您在数字中使用 e 还是 E)?
scanf()
%g
%G
strtod理解指数符号。参见例如http://pubs.opengroup.org/onlinepubs/009695399/functions/strtod.html。
strtod