に私はこれに新しいですし、C++エラーC2659は、C++のVisual Studio
でのプログラミングに私はエラーエラーを得続ける:1つのエラーC2659: '=':左オペランドWとしての機能:CGT 215 \を最終的なプロジェクト\ \ゲーム\ゲーム\ paddle.cpp 11 1つのゲーム
2のIntelliSense:\ CGT 215 \最終的なプロジェクト\ゲーム\ゲーム\のpaddle.cpp 11 2ゲーム
#include "Paddle.h"
#include <iostream>
Paddle::Paddle(int width, int height, float (*Controller)())
{
m_position.x = 100;
m_position.y = 100;
m_width = width;
m_height = height;
Control = Controller;
}
void Paddle::Update()
{
m_position.y += *Control();
}
あなたの質問はこの記事と非常に関連しています:http://stackoverflow.com/questions/21565790/c-pointer-to-a-function-in-struct –