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 ¢er );
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
精彩评论