Hi,
a note at first. From your source code I deduce you're running your stuff on Windows. My experience is at most with Linux and embedded systems therefore
take my hints with a grain of salt. Especially because you didn't tell us about your platform, the installed compiler and the Code::Blocks version.
So I started C++ a while ago and I tried to code something that reads memory, apparently I needed the files ProcMem.cpp and ProcMem.h for this...
Well from the code I deduce you want to read memory regions from a foreign process. Ok, googling around with "
ProcMem.h ProcMem.cpp source code download microsoft" revealed that you apparently try to hack/cheat in a game (deduced from this
http://www.mpgh.net/forum/showthread.php?t=915641 forum page).
This is my error: http://gyazo.com/689e89e1b14c07bd2b7f1b63d224fc60
After all let's look at the screen shot. From the format of the warning message ("[-Wunknown-pragmas]") I guess that you're using a GCC compiler under Windows. Either the bundled MinGW or a self installed TDM-GCC. If we look now at the source code we see:
#pragma region TEMPLATE MEMORY FUNCTIONS
:
:
#pragma endregion
Be aware that
#pragma directives are always compiler specific. From the fact that the used compiler complains about that I deduce that you're
using the wrong compiler for that source code. I would assume that these ProcMem.* stuff needs to be compiled with a Microsoft C++ compiler. I
also would guess that the error with "
no matching function to call: ..." will disappear then. For the meaning of these pragmas you have to dig
in the Microsoft compiler documentation.
Keep in mind that Code::Blocks is only a graphical front-end for any installed command line compiler. You select from "Settings -> Compiler ..." which
compiler Code::Blocks should call for a project. So you have the opportunity to choose between different compilers on your machine that you have installed yourself in advance.
So install a Microsoft compiler and give it a try.
Regards,
pirx67
PS: Please be aware that this forum is definitely only for the discussion of problems related to Code::Blocks and not for issues related to the
underlying compiler. Therefore this thread is off topic on this site and will probably soon be locked.
PPS: I would have been definitely much more helpful if you included the output from the
Build log tab as
text instead of posting
a screen shot. The right way to debug/report a compiler problem is described at
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F