Using C++ codebase
Your questions are a bit vague, even though you're trying to be precise. I'll try to answer them though...
"What is the general structure of a larger C++ program?"
That really depends on what the program is trying to do and how it is architected. This is very hard to answer because it's similar to asking "What is the general structure of a building?"
So... for most C++ programs, you usually have tons of files broken down by classes. Usually you have a header file which defines all of the class headers, variables, functions, etc. Then the CPP file usually contains the implementations of the "stuff" described in the header file. I'm sure you already know that though, so I'm not sure what you're trying to answer. The second bit is how all of those classes interact with each other (aka, object oriented programming). When enough classes are used often enough and are general enough to be used all over the place, people create "libraries" which expose the commonly used data structures (such as lists/vectors, hash tables, sorting methods, etc). Usually you don't care about the implementation so long as it works as expected.
I think that if you're trying to incorporate the exposed functions from "math.h" into UE4, you'd probably want to create wrappers for each of the methods in math.h you'd like to use in UE4. But, as I recall, UE4 already comes with a robust math library so you're probably wasting your time and instead should be trying to figure out how to use their math library. I'm sure the differences in the implementation of Sine and Cosine yield the same results, right? Regardless, it doesn't sound right that you should be having trouble with including a header file into your program. Usually when you include a header file, you're giving the compiler a path to a distinct file which exists somewhere on the hard drive. When the compiler compiles the program, it takes all of the header files and cpp files and creates a single binary executable. If your project includes or references an external library (like a DLL), then the program it compiles will try to reference the DLL instead of adding its binary into your executable. For this reason, it is very important that the DLL on all computers which run your program are the same version or support backwards compatibility. Many games will bundle the dependent DLL's as a part of the installation process just to make sure that the right versions are being used.
If you're using Visual Studio, usually you can step through your code line by line, and step into functions to see where the implementation lives (or just highlight a method and press F12). This should tell you where any calls to math.h are being made. This also gives you a pretty good idea on how stuff is laid out in the framework you're using. For most programs/frameworks/libraries, the best way to get an understanding of their layout is to read the Application Programming Interface documentation. It's always specific to the API, so that's about all the help I can give you on program internals... Hope this helps!
Eric Nevala
Indie Developer | Spellbound | Dev blog | Twitter | Unreal Engine 4
Maybe this would be a better thing to post on the unreal forums. What you mentioned about DLL's was helpful, it sounds like they have the behavior that I expected, I just find it frustrating that I have this piece of code that works on my machine so nicely all by itself, and there is such difficulty for me to figure out how to incorporate it into my UE4 project. I feel like there should be a way for me to just extend a class from a UE4 blueprint node and just #include it or something. I just don't know the rules, like what does it mean to #include something? how is that different than extending a class? You don't have to answer that, i'll end up googling it, but I just wish that the information about these types of things, like how all these files work together, would be accessible in one place, instead of me having to google search every single time I have a question like this. I.E.: if I search for information about header files, the places that I find information about header files doesn't mention any of the other types of files unless I do a lot of digging around. Heck I only found out about what libraries were very recently. Until a week or so ago, I didn't think DLL had anything to do with C++. I thought it was just some super low level operating system jargon or something.
Who knows, maybe I'm just too hopeful, It just feels like most of the teaching resources I've found jump from "hello world" to simple collections to advanced algorithms. How the heck is that useful if I don't even know how to re-use existing code? Maybe I'm just complaining too much.
Either way, thanks for your input, it was helpful.
In the case of 'math.h' this is a standard header file and #include will pull it into the file you are compiling.
DLLs have nothing to do with C or C++ directly, this is correct - they are an OS thing.
The UE4 blueprint stuff does largely work how you expect; you derive your new blueprint class or function from an existing base class and implement your code there. The docs on Blueprint development might help although I think you might need to improve your C++ knowledge a bit before getting into trying to code them.
Finally, a note on your noise lib of choice; the UE4 license specifically calls out the fact you are not allowed to use it with GPL code - while you keep it on your machine you are technically OK but you can never release your code, nor anything based on it, due to this restriction.
Thanks phantom, that's really good to know. I'll be sure to try to dig up the original public domain version of the code then. I was worried this might be the case with the GPL v3, I wonder why they force my whole program to be open source when i could just release the source on the part under the GPL. That's some freedom for ya. Oh well, time to do some more digging i guess. I'm pretty sure Perlin has a C++ version of simplex when he released his algorithm to public domain, if not then hopefully it won't be too hard for me to grab the C# one that I know for sure is on public domain and rewrite it as C++.