c++ - function is not a member of global namespace -


So I'm trying to chess the program in C ++ and I decided to make my conductor my class (this was a main function before the function), so I did not copy it to every other place without copying me

However, when I finished setting everything up I found this error: 'parseMove': is not a member of the "global namespace"

< P> standard names I am using the pace and all public functions and variables, and please let me know how to bring it until it is not relevant. My IDE is MS Visual C ++ 2012.

Here is the code:

In the main:

  zero playGame () {... MoveParser parser; // Turn on the declared driver ... // example parser. Parsemov (current, currentx, current y) example; ...}  

MoveParser.h:

  #pragma once #include & lt; Sstream & gt; # Include & lt; Iostream & gt; #include & lt; String & gt; using namespace std; Class move parser {public: move parser (zero); ~ MoveParser (zero); Zero parsmov (string, int and, int and;); };  

MoveParser.cpp:

  # "MoveParser.h" Include: MoveParser :: Move Parser (Zero) {} Leave Parser :: ~ Lip Parser (Zero) {} Zero :: parseMove (string str, int & x, int & y) {// random junk}  

and also Visual C ++ give me some new errors Which is not real ... and I know that they are not real because errors on the code given by me have been cured, before I added a new class and I did not change it.

Anyway, very disappointing, hopefully someone can tell me in the right direction.

You forgot to specify the name of the square before the name of the function. Define this code

Code> void MoveParser :: parseMove (string str, int and x, int & y) {// random junk}


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -