Hi Rich,
Here is the link to my current quadcopter code with the examples: Link.
Note that I will take down that repo after a few days, because that code is way in alpha stage; it's unclean, it's incomplete and just makes me feel bad. The main point is that you will see that I have a library for WiiExtensions and Servo. Those are included in my PrimaryHeader.h. Then, PrimaryHeader.h is declared across all my .cpp files :D
If that code is too hard to navigate, refer to this page; great example: Link. Should be extremely useful once my repo goes down.
Re MbedJSONValue.h: I see no problem including it across many files. In fact, my understanding is that we probably want to do that. For example, if I had some function called foo, I dont want to have to type it out in every single .cpp file where it is called. Rather, have a single header, and then point every .cpp file to that header; much neater, and definitely easier to debug.
Once you get to advance compiling, you will see that having it out as a header could be very time-efficient, since there is less code to compile: Source.
Hope this helps,
Ian =]
Hi all, As I continue forward with my project I am noticing my main.cpp file is getting quite large when it comes to the amount of lines my main.cpp contains. I created a cf.h file and copied then pasted the functions that require the ConfigFile library into the cf.h file. I left include "ConfigFile.h" library in the main.cpp file thinking the cf.h file could 'see' the functions in the ConfigFile.h library, but debug through errors. I fixed the errors by including the ConfigFile.h library into my cf.h file. If possible, how do I get my cf.h file to 'see' the functions in the ConfigFile.h when #include "ConfigFile.h" only exists in the main.cpp file? I would like to keep current and future #include somefile.h in my main.cpp file so other future .h files can use them when loading them once in the main.cpp. I am not sure if what I am trying to accomplish is considered a class? I wouldn't even know where to begin about writing a class if that is the case.