错误:<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 (将#修改为@)