Ich bin neu in diesem und in die Programmierung in C++Fehler C2659 in C++ Visual Studio
ich die Fehler Fehler erhalte: 1 Fehler C2659: '=': Funktion als linker Operand W: \ CGT 215 \ Abschlussprojekt \ Spiel \ Spiel \ paddle.cpp 11 1 Spiel
IntelliSense 2: Ausdruck ein modifizierbarer lvalue w sein muss: \ CGT 215 \ Abschluss Project \ Spiel \ Spiel \ paddle.cpp 11 2 Spiel
#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();
}
Ihre Frage bezieht sich in hohem Maße auf diese: http://stackoverflow.com/questions/21565790/c-pointer-to-a-function-in-struct –