【发布时间】:2011-05-05 21:56:08
【问题描述】:
我正在尝试使用将十六进制值接受到链接列表中的对象制作一个基本的 C++ 程序,并允许用户添加/乘以列表中的值。问题是我在对象的乘法区域中遇到编译器错误。代码如下:
void LList::Multi() {
element new_input;
element temp;
element temp1;
cout << "Please enter the number you would like to multiply." <<endl;
new_input = Read_Element();
temp = head −> data;
temp1 = (temp * new_input);
head −> data = temp1;
}
这是我得到的错误: LList.cpp:在成员函数 void LList::Multi():LList.cpp:77 中:错误:在 temp * new_input 中与 operator* 不匹配
我只使用
【问题讨论】:
-
你好,@deadly.foxie。欢迎来到堆栈溢出!什么是
element?
标签: c++ linked-list compiler-errors no-match