微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

错误:<path> 属性 d:预期的数字,“MInfinity,NaN CN...”

如何解决错误:<path> 属性 d:预期的数字,“MInfinity,NaN CN...”

我在 Amcharts 中使用 Vue.js。 在一个函数中我生成我的图表数据,在另一个函数中我创建我的时间线图表,点击一个按钮我正在调用这两个函数。 问题是当我单击按钮更改生成的数据时出现错误

错误属性 d:预期数字,“MInfinity,NaN CN...”。

#include <iostream>
 
using namespace std;
 
class Line
{
   public:
      int getLength( void );
      Line( int len );
      Line( const Line &obj);

   private:
      int *ptr;
};
 
// constructor
Line::Line(int len)
{
    ptr=&len;
    cout<<"*ptr="<<(*ptr)<<endl;
}

// copy constructor
Line::Line(const Line &obj)
{
    // int x=3;
    cout<<"[origin] *ptr="<<*obj.ptr<<endl;
    ptr = new int;
    *ptr = *obj.ptr; // copy
}

int Line::getLength( void )
{
    return *ptr;
}
 
void display(Line obj)
{
   cout << "line=" << obj.getLength() <<endl;
}

int main( )
{
   Line line(10);
   display(line);
   return 0;
}

我什至试图处理图表,但错误仍然存​​在。 谁能告诉我这个错误是什么意思或如何解决这个问题?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。