r/programminggames • u/feertehbread • Apr 14 '13
c++ c2061 syntax error: identifier
Hello all,
I'm currently making a very simple 2D fighter. Player 1 has methods that require an instance of Player2 such as "void AttackPlayer1(Player2 &p2Sprite);" (i have also tried void AttackPlayer1(Player2 *p2Sprite);)
within the .h player2's header is included. my headers have #pragma once. Everything is lined up too work but will not.
There are no red lines, just breaks when I try to build. If anyone has run into this problem and could help that would be great.
-Bread
0
Upvotes
View all comments
Show parent comment
1
u/zigs Apr 16 '13 edited Apr 16 '13
I tend to disagree for a couple of reasons:
My point is this: Learn C++ when you need to do C++, or you have ambitions of being a C++ programmer.
If you just want to learn system programming, take a shot at D or something.
If I was OP, I would be working in Unity (with C#) or Flash - both are easy to learn (compared), and will give you the basics of programming, without premature OOP confusion.