Error c3861: identifier not found | identifier not found

Just began to learn C++, today encountered more depressed problems, maybe beginners will encounter this problem, take it out to share.
Define a function, and then call in the main function, compile a run, prompt me “: identifier cannot be found “… , using VS2010.
I looked at it so many times, couldn’t find the solution, and finally found the answer on StackOverflow,
http://stackoverflow.com/questions/16290834/error-c3861-rolldice-identifier-not-found
The compiler compiles the contents of the file from top to bottom, and the function A is called in the main function, but because the main function is defined before the function A, the function A is not defined when it is used, so the “identifier cannot be found” situation occurs.
So, you just have to move the function forward.

Read More: