time_t now = time(0);
As I say, I'm sure this is fairly straightforward but I've got hold the wrong end of a stick somewhere but I've spent a few days on this and have tried quite a number of different permutations in the calling statement
your code: s_remaining(tm_end);
does actually mean: Create an object of typeclass s_remaining. Initialize the object with 'tm_end' object.
This would require the class s_remaining to have a contructor that accepts struct tm as parameter.
It is not a "function call".
If you want to call that non-static member function, you have to have an object:
1 2 3
ms = foo.s_remaining( tm_end );
Oh, how embarrassing (but I did say "I'm stuck on something that's probably really simple" and ".... I'm sure this is fairly straightforward but I've got hold the wrong end of a stick somewhere"). That's why I posted this on the beginners forum.
But thanks for that Keskiverto. I've re-read the chapters on class definitions etc and can see that I totally missed the point.
My justification here is that I've been a VB programmer for many years and I now realise that in that language everything that's even slightly "tricky" is hidden/automated so you don't have to think. e.g. I've been involved in a couple of seriously major projects (thousands of classes) and never needed to do an overload.
I'm teaching myself C++ as a private "hobby" to stretch my mind. Quite a bit more stretching needed.