@grahamdearsley
Forum Replies Created
-
AuthorPosts
-
well yes sort of
WIndows gives user programs a user and a kernal stack. Every time a user program calls a Windows function it changes into kernal mode.
it is a primer like it says because it misses out some of the more advanced stuff but if goes into great detail on what it does cover.
๐Oh no. This is the book I was looking for
Still can’t match the hardware access I get in Atari BASIC. Can Peek or Poke from there ๐
REALLYย good book
C++ tries to keep me away from pointers with its references. I can just pass a reference to an object, it is almost the REAL object, if I change it I change the memory the original points to.
Exception handling is in 2 chapters time ๐
And then we get “range” FOR loops. I know what they do but I forget where the iterator comes from. Practice, practce,practice ๐
Reading your post ?
Er, looking for ANY Woman who will let me visit ๐๐๐
I am going to need to go again with the exercises to make things stick. Remembering the syntax is the main thing and only practice will do it.
I know when I want to pass an object by reference or by value but the *’s or &’s are a pain. Then we get && and other such things.
Then we find C++ can pass an object AS a reference to another object instead of using a pointer, anything you do to the reference also happens to the original object .
Like I said, some practice required.
I intended to skim the whole book just to get a flavour of whats in it and then start again at the beginning, doing the exercises, but I got sucked in so im READING the book without doing the exercises ๐
When I get to the end I will have to start again and do it properly.
Well you could do that but I think that inheritance has mostly been introduced to make such things unnecessary, meant to keep your thinking on the straight and narrow.
I don’t really know though because I only just started the chapter on inheritance and so far its as clear as mud ๐
More interesting info about Struct’s in my new book. In most ways C++ treats a Struct exactly the same as a Class. The only difference is that Struct’s don’t support inheritance. You can have a function in your Struct, no problem.You can even have a local Class in your Struct (you will have to pass any arguments from within the Struct).
I may have a look at that later but at the moment I am trying my best to stick to just plain C++, Visual Studio does not make that easy though because Microsoft would really rather I used C# under the .NET framework to produce managed code. In fact they would really rather I wrote Universal app platform apps but it ain’t happening any time soon.
I mostly use the W10 GUI but I still keep a shortcut to control panel classic view pinned to my task bar, just can’t help my self ๐
https://www.grc.com/x/ne.dll?bh0bkyd2
Neither the link nor Shields Up, linked to above, show any open ports on my Talk Talk Super Hub but they can log in to the router some how because they did it last time I had a speed problem.
My new book has been telling me more about Vectors and C++ style strings.
The elements in a Vector must be stored continuosly in memory so that they can be accessed by an index number. If you initialize a vector with an initial number of elements using square brackets, “[10]” say, or a list of initial elements then the vector will be allocated enough memory for them ONLY to start with.
If you use the push_back function to add another element to the end of the list then more memory will need to be allocated. To make sure that the memory remains contiguous the Vector function needs to assign a new bigger block and then copy the existing elements into that before deleting the originals. The Vector function ensures that the Vector name now points to the new block. This time round the Vector function assigns more memory than the new Vector will need and the amount is implementation specific. You can use the Capacity function in Vector to find out how much extra you have.
The other point to note is that the elements in a Vector are only pointers or “vectors” to the actual data the Vector holds so that data does not move when a Vector is expanded, that and the extra capacity makes expanding Vectors quick.
C++ std library strings work in a similar way but their elements actually do hold the charachte data.
https://support.mozilla.org/en-US/kb/private-browsing-firefox-android
Don’t know how up to date the above is.
I don’t know much about Scratch but Atari BASIC would be considered low level compared to some of the fluff that’s out there today.
Now if we all have our emulators set up then a really good demo of what the old 8 bit can do is Numen (Single disk).
This is an auto boot image so you need to run it from the boot image option under file in Altirra and then hit enter to start.
http://www.virtualdub.org/altirra.html
If you really wan’t to play around with Atari 8 bits then emulation is probably your best bet. Altirra, linked to above , is meant to be the best but I use Atari Win800.
Once you have your emulator set up then head on over to Atarimania for all the software and books/mags ever written. You’ll be playing Star Raiders again in no time ๐
The best thing about programming on an emulator is that you can have a hard drive as device H: and save directly into a folder on your PC.
I hope you give it a try because then you can have a go of the Sudoku solver program I just wrote in Atari BASIC, posted on the Atariage 8 bit forum ๐
Well I’m half way through my new programming book and so far it has been very good, but I can’t let it get away without a couple of niggles ๐
At the start of the book they say they are going to be teaching the latest C++ standard from the off, where a new feature is in every way better than an old one they will only cover the new one. Fair enough but then they spend a lot of time covering old features that you will only need if you want to use your new code with existing old code. I think that should have been covered in a separate chapter because it breaks up the flow of things.
The other niggle is that I think they over complicate some things too early. For instance, from the very start they say it is best to pass arguments that a function won’t change as Const, then they describe at length the restrictions that will cause. Well it is good practice but I think it is a bit over the top for a C++ Primer book.
Comments are welcome on the above ๐
-
AuthorPosts
