开发者

Expected unqualified-id before '&' token

(extremely) inexperienced in C++ but I've been getting along ok until now and this has me stumped. I'm unsure if I've included enough code to diagnose this but I believe it's syntax and might be figured out from the following. I'm getting the error mentioned from the line below:

#pragma once
#include "cinder/Vector.h"
#include "cinder/Color.h"
#include <开发者_开发问答vector>

class Predator {
public:
    Predator();
    Predator( ci::Vec3f pos, ci::Vec3f vel );
    void pullToCenter( const ci::Vec3f &center );
    void update( bool flatten, const ci::Channel32f &channel ); // <- error's here
    void limitSpeed();
    void draw();
    void drawTail();
    void addNeighborPos( ci::Vec3f pos );

And can't spot anything wrong? I've googled the error and it usually seems syntax related but can't see how it relates here. The line giving trouble is actually used in a previous class and doesn't throw any errors. Thanks in advance.


I suspect you don't have the right #include for Channel32f.


Try adding

#include "cinder/Channel.h"

http://libcinder.org/docs/v0.8.2/_channel_8h.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜