October 31, 2018 at 8:11 pm #27773ParticipantWheels-Of-Fire@grahamdearsley
<p style=”text-align: right;”>Can we put this topic up please boss. In tech ?</p>
April 22, 2019 at 5:18 pm #32854
How do I download a file from GitHub ?
I have an account and the desktop app but I cant see how its done.
Someone called whitehatty has kindly posted updated versions of Mr Stroustrups files but I can’t get them. There is no master Zip.April 22, 2019 at 5:26 pm #32855
If you care to take a look its under:
Whitehatty/Programming-Principles-And-Practice-Using-CppApril 23, 2019 at 6:52 am #32859
How do I download a file from GitHub ? I have an account and the desktop app but I cant see how its done. Someone called whitehatty has kindly posted updated versions of Mr Stroustrups files but I can’t get them. There is no master Zip.
I assume that you clicked on ‘Clone or Download’ (top right green box), and nothing happened.
Normally this gives you the option to download a zip file of the code. If it did not work for you try again as the 12.4Mb download worked just fine for me.April 23, 2019 at 8:35 am #32861
Thats exactly what I did,twice. I got the message there is no master Zip. 10 minutes later I noticed there is no connection to the internet either ?.
My connection kept going up and down so I gave up until this morning. I now have the new files but they still wont compile.April 23, 2019 at 10:02 am #32862
If you have Visual Studio installed and you fancy giving it a go by following the walk through I posted earlier then there are a couple of things to note.
The first part of the walk through is just compiling fltk from source.
The files from Github need to go in the actual project folder inside the solution folder.
Don’t untick any of the inherit from project boxes (it shows that in one of the screen shots) or you will get “can’t open source wsock32.lib” or any other Microsoft library.August 4, 2020 at 10:53 am #61031
I have somehow overlooked the C++ data type of “struct” until now, probably because it was not mentioned in the online course I did.
Anyway a srtuct is a type of simple class where all member variables are public and member functions are not allowed except for the case of constructors which have the same name as the struct.
The member variables can be of any type so a simple struct could be useful as a member of a vector, say, but as all members are public you can not force people to call a constructor to type check their values before changing them.
Come to think of it, may not be so useful after all 😂August 4, 2020 at 11:45 am #61033
Struct was an old C concept which I guess evolved into the ‘Class’ concept. Iirc I used to use it a lot as a handy way of getting out of a tangle of pointers by defining a pointer to an instance of a structure. (bit like a pointer to a class member). It was also a handy way of compressing info by defining a byte structure with the components made up of yes/no bit fields that in total formed the byte.
Totally off-subject but led there by mentioning compression is this completely zany way of encoding and compressing words into numbers, all one would need to do is to encrypt the numbers to finish with a fairly difficult to break ‘Book Encryption’ routine that would tickle the nerdish fancy of many in GCHQ. (fyi There are ways of moving from Python into C++ especially if you use an Apple.)August 4, 2020 at 12:34 pm #61038ParticipantJayCeeDee@jayceedeeForumite Points: 5,638
Side comment on a subject I know nothing about, I get Kindle’s Daily Deals and there have recently been a few books on programming, C, C++ and others going for ( the Kindle version ), £9 – £12 instead of £55 – £70. May be worth a look for reference, if not education/instruction.August 4, 2020 at 1:13 pm #61040
There are very few decent books on learning to program in C/C++, they generally fall into one of two category’s 1) Command reference manual 2) Rubbish 😂
I have the Programming principles and practices using C++ book by Bjarne Stroustrup and it would be good except it has not been updated to support newer versions of Visual Studio. The authors have written a special header file called std_lib_facilities.h that they include in most of their examples but it will NOT compile, for many reasons, on any later version of Visual Studio.
If you already know a bit of C++ then you can follow the examples without the header file but when it comes to the interesting bit where they explain classes by using them to define graphics functions you will find that the example classes are in the header file which will not compile !August 4, 2020 at 1:38 pm #61042
In the same book they use the tokenizeing process that compilers go through to interpret your source code to explain the use of rules and grmmers, a bit like the encoder in your link does.
That bit of the book is quite good but I found a better explination of tokenizing in the Atari BASIC source book, published by the writers of Atari BASIC and avaliable for download from Atariage.August 4, 2020 at 5:15 pm #61050
My #1 son had an excellent book on C/C++ written iirc by an Indian gentleman. However like my own C/C++ books it was written in the days when the only IDE of any account was that of Borland and both C and C++ were a lot slimmer.
Graphics of course were and are a course of study in their own right especially if you add on nVidia’s contributions.August 4, 2020 at 5:27 pm #61052
My edit disappeared.
The only reason simpler old code does not compile is that it offends managed code rules or extensions. Try right-clicking on your code and select ‘C/C++ -> Advanced Properties and then Compile As C89 or maybe even C87 if that is allowed.August 4, 2020 at 5:33 pm #61054
DirectX is another subject in its own right and no one seems to do a good book about that either.
What’s really annoying though is the huge lack of information about setting up and using the Visual Studio IDE with C++ and the Win32 API/DirectX. The documentation used to be avaliable in printed form with updates provided in help files that came with newer versions of Visual Studio, then it was made download only and now it is scattered all over the developer forums and GitHub and only accessible by following a great long chain of links 😡August 4, 2020 at 8:26 pm #61078
It has been a while since I last looked at std_lib_facilities.h as I have given up on ever getting it debugged.
As I recall though, the main reasons that it would not compile were a dodgy macro that they even call a “disgusting fudge” in the comments and the fact that they use a typedef to redefine the standard library vector as Vector which uses their own range checked version instead. Not only does their version not work, it is not needed because vectors ARE range checked in C++14 and above, may even have been C++11.
Those are just the two things I remember most, there are a host of others and of course the linker chips in with a long list of errors too. In short its just rubbish 😁
If you fancy a challenge though, don’t let me stop you from trying to debug it, I will post you a link to download it if you like 😃August 4, 2020 at 8:59 pm #61083
Thanks but no thanks. I have too much Python code to play with.September 6, 2020 at 10:37 pm #61825
In my quest to find a decent C++ programming book I have just ordered “The C++ Primer” from Addison-Wesley. I overlooked this book before because it has “Primer” in the title and I thought it would be to simplistic but I have now read the first chapter on the Amazon preview and it seems really good. The reviews from those that have managed to read it are all 5 star too, apparently the Kindle version doesn’t work.
Should arrive on Tuesday so we shall see.
Now if I can just find a decent reference guide to Visual Studio and one to the Windows API (formally win32 API) I will be happy 😁September 6, 2020 at 10:50 pm #61827
Oh I did find that the Windows API has cursor control and positioning functions for console windows, just need to include windows.h to call them from a C/C++ console program. The functions take a window handle for your console window and then arguments for whatever they do like an X and Y position.September 7, 2020 at 7:39 am #61830
During your search for C/C++ reference books do not forget to check out the books by Robert J. Traister. They have been singled out for sheer awfulness and inaccuracy by no less a person than The Woz!September 7, 2020 at 12:16 pm #61837
Ouch !September 7, 2020 at 12:28 pm #61840
I meant to mention earlier that I was only able to miss noticing Struct’s because of classes. In most cases a class is a better option but Windows was mostly written in C and a lot of its functions expect a Struct as their input argument.
- You must be logged in to reply to this topic.