Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
I'm trying to use the drawequipicons() function that is in the renderhud.cpp in the dokill() function that is inside of the clientgame.cpp
I read that to use functions defined in another cpp, I need to prototype them in a header (.h) file and then #include it in my clientgame.cpp.
I'm not quite sure if drawequipicons() is prototyped in a header or not, how do I find that out?
Posts: 101
Threads: 2
Joined: Sep 2011
Thanks: 1
Given 6 thank(s) in 3 post(s)
hmm.
I don't want to find it for you, look in protos.h.
Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
01 Feb 13, 12:27AM
(This post was last modified: 01 Feb 13, 12:28AM by Lee.)
Well besides that, if it is prototyped, then I should be able to execute drawequipicons() without any errors right?
When I did this inside of clientgame.cpp, I got an error:
#include <renderhud.cpp>
It said in the Output that this line was skipped and then it gets an error on drawequipicons() since it was never defined.
EDIT: I CTRL+F in protos.h and typed 'drawequip' but it didn't find it in there. Does CTRL+F even work when you search for these things?
Posts: 1,331
Threads: 44
Joined: Jun 2010
Thanks: 13
Given 10 thank(s) in 8 post(s)
In most text editors/IDEs, Ctrl + F will perform a search for text within the currently opened/focused file, not all files you may have a tab open for. This is why I suggested you get a program like AstroGrep in the other thread. It makes it easy for you to search the /src/ directory (all source code files) for certain text/line of code (rather than searching file by file manually with Ctrl + F).
Posts: 59
Threads: 21
Joined: Dec 2012
Thanks: 0
Given 0 thank(s) in 0 post(s)
When I CTRL+F in VS, it has an option to search the entire solution/project. Isn't that the same though? I get the same search results with astrogrep.
Posts: 1,331
Threads: 44
Joined: Jun 2010
Thanks: 13
Given 10 thank(s) in 8 post(s)
01 Feb 13, 12:52AM
(This post was last modified: 01 Feb 13, 12:52AM by Bukz.)
Not too sure about the VS option, sounds like it might/should work but I've never used it myself so I can't confirm. Maybe it only searches all currently open files in the project? (meaning you would have to open all source files for the project in the IDE then do it to get the same effect as an AstroGrep search)