OT? ISO: complete example c++ class

Discuss anything related to product development
Post Reply
grant
Posts: 9
Joined: Mon Aug 28 2017 6:34 am

OT? ISO: complete example c++ class

Post by grant »

Hi,

I hope this request is not too far off topic, but copperspice does have general C++ learning videos too.

I'm working to master the subtleties of moderately advanced C++ and therefore have this request:

ISO: complete example c++ class - including all or most constructors and operators, including arithmetic operators.

Hoping to find a full implementation in sample source code, preferably without the use of template syntax (to keep things simpler/more clear for learning). Including iterator implementation would be a nice bonus.

This is for the purpose of learning and I would prefer it have a non-restrictive license such as: MIT, Boost, Apache, UnLicense, BSD, Public Domain.

Of course, Stroustrup gives everything needed in TC++PL but not in one complete listing, so this is why I'm asking.

I do see the cs_string source, and I may end up working with that fine example, but I don't suppose arithmetic operators are covered since you can not divide strings, and it does use templates which complicates things somewhat.

Any assistance would be appreciated.

++Regards.
Grant
grant
Posts: 9
Joined: Mon Aug 28 2017 6:34 am

Re: OT? ISO: complete example c++ class

Post by grant »

What I'm looking for is nowhere on the internet, or in any book, but I have started such a example class here:

https://github.com/grantrostig/cpp_by_e ... lass_all.h

Please don't laugh too much as you review and perhaps comment. :)
Post Reply