@Xanadu4ever,
Yes, just put the keyword "inline" in front of the two functions I mentioned - it takes care of some linker errors referencing mersenne twister as already defined (it's a related notion to random values those functions use).
Don't forget about graph.cpp. The files I show to add to the include section reduce hundreds, possibly thousands of very strange errors (it would make you think std::vector is no longer valid code).
Why...I didn't research. I just noticed a depenency on other translation units. I compiled them one at a time, where main, window and gui all compiled with minor warnings, but graph blew up.
Also, I added the appropriate dependencies from the build of FLTK, and set input directories for the linker, and include directories for the compiler which aid in directory structure (which is what Stroustrup references with the "call a friend" suggestion).
Not much else was required as I recall.
I set the compiler for VC++14 compliance, so I expect VS2015 would be fine if it has been updated.
As to skipping to other sections....well, the work is from elementary to upper intermediate C++11/14, so to me it seems reasonable to skip what you already know. That said, if what you know is C++03, then reviewing what is new about C++11/14 would suggest not to skip. Even with decades behind me, I found skimming through informative as to Stroustrup's points, though I didn't need to do more than skim - that's just because of the decades behind me.
Man I wish I was a Unix guy! |
Well...there's two points on that. First, I was and am a "*Nix" guy, though I value Linux over UNIX in the present tense (they are identical designs, but Linux is what UNIX was supposed to be).
Still, acknowledging that there is no operating system on the planet as reliable, or efficient, as *Nix, it does deserve the reputation for being complicated. Having said that, so is Windows. At the same time, much of what users find "nice" about Windows configuration/updating is the same basic thing on many Linux distributions.
However, there is one thing that keeps me in Windows more than all else. I do require some applications for which there are either only Windows versions, or there are MAC versions "too". One of those is Visual Studio. Frankly, if you have ever tried to get a Linux workstation configured for development in C++, and compared that to the experience of getting Visual Studio installed and ready on Windows - there is no comparison. Nothing goes from zero to ready as easily or quickly as Visual Studio. QtCreator does offer a close comparison, but it really is not quite the same in operation.
You are actually well served in Windows under Visual Studio, with one caveat. The Microsoft compiler is not going to be among the more current with C++ standards. Some regard it is poor, though it is fairly good through C++14 in VS 2019, and does support much of C++17. On the other hand, configuring and using CLang in Visual Studio 2019 is nearly trivial, which is much better C++ conformance. GCC I've never figured out for Visual Studio, though I know it's possible.
Key to VS productivity is the project configuration. For anything short of a massively complex project, the ability to configure a project in VS is extremely simple. Compared to, say, Eclipse, it's effortless. Most other IDE's very quickly become little more than a front end to CMake, Make or other command line build tools.
Eventually we all should learn to use those command line build tools, but for the early years, and for quick "start to working" - nothing beats VS for quickly making a project grow fast.
The other is the debugger. It's fast, reliable (surprisingly robust), and full featured. Comparing other debuggers is just no fun. KDevelop is fair, so was Eclipse (lately I can't get a Linux Eclipse installation to stay configured and working). QtDevelop is like KDevelop in the way the debugger works, which is ok, but not nearly as full featured as VS Studio in Windows.
I'm not trying to sell you on VS. I otherwise despise Windows itself. It's a pig. If you ever really test performance, especially I/O (disks) and processes, you'll recognize just how powerful and advanced Linux really is (even UNIX, depending on which release, is superior - like from another planet superior).
I simply must hand it to VS, though. The compiler itself isn't all that impressive, but the IDE has not been exceeded in many years. I wish they made Linux and MAC versions, but they don't. They offer Visual Studio Code - which ultimately is a "also ran" version of the same kind of result I see with everything from KDevelop to Eclipse, IntelliJ, QtDevelop and all else on *Nix.