运行此代码时出现段错误。可能是错误的索引,但我感到困惑,因为我尝试访问的元素存在,如显示在“绘制”之前的“ cout”。
我使用GCC:g ++ -std = c ++ 11 ./ellipse.cpp -o ./ellipse -Wfatal-errors -lsfml-graphics -lsfml-window -lsfml-system
我会继续搜索,但会有所帮助。
最诚挚的问候,
MC
ERROR in ./src/app/components/todo-item/todo-item.component.ts 27:4
Module parse failed: 'return' outside of function (27:4)
File was processed with these loaders:
* ./node_modules/@ngtools/webpack/src/index.js
You may need an additional loader to handle the result of these loaders.
| 'is-complete': this.todo.completed
| };
> return classes;
| }
| ;
ℹ 「wdm」: Failed to compile.
ERROR in src/app/components/todo-item/todo-item.component.ts(21,1): error TS2304: Cannot find name 'setClasses'.
答案 0 :(得分:1)
非常感谢。经过进一步搜索(知道如何命名问题),我发现这是一个非常常见的错误。这是更正的代码:
callback