| Page: |
| Home > Help Needed / General Tech Chat > anyone write C++? | |||||||
![]() 12307 Posts Member #: 565 Carlos Fandango Burnham-on-Crouch, Essex |
22nd Mar, 2010 at 10:37:23pm
I have to write a bit of C++ code to convert ????? seconds into Hrs:Min:Sec format,
On 28th Aug, 2011 Kean said:
At the risk of being sigged... Joe, do you have a photo of your tool? http://www.turbominis.co.uk/forums/index.p...9064&lastpost=1 https://joe1977.imgbb.com/ |
||||||
|
499 Posts Member #: 2257 Senior Member Brighton |
22nd Mar, 2010 at 11:03:30pm
I think that looks right to me.
|
||||||
![]() 12307 Posts Member #: 565 Carlos Fandango Burnham-on-Crouch, Essex |
22nd Mar, 2010 at 11:04:47pm
lol i'm only a couple of weeks in too,
On 28th Aug, 2011 Kean said:
At the risk of being sigged... Joe, do you have a photo of your tool? http://www.turbominis.co.uk/forums/index.p...9064&lastpost=1 https://joe1977.imgbb.com/ |
||||||
|
4314 Posts Member #: 700 Formerly British Open Classic The West Country |
22nd Mar, 2010 at 11:23:07pm
It's been about 10 years since I wrote any code so I'm very rusty but it looks about right, does it compile & run? The only thing I'm not sure about is whether or not long the correct variable type would integer be better. Isambard Kingdom Brunel said:
Nothing is impossible if you are an Engineer |
||||||
![]() 1424 Posts Member #: 2810 Formally spanner181187 Dublin, Ireland |
22nd Mar, 2010 at 11:28:22pm
It looks OK to me too. I haven't done any in 3 years though. I'll stare at it for a while longer and see if I get anywhere On 12th Nov, 2009 Paul S said:
I think Gary OS has taken over my role as the forum smart arse ![]() On 30th Apr, 2010 Rod S said:
Gary's description is best |
||||||
|
499 Posts Member #: 2257 Senior Member Brighton |
22nd Mar, 2010 at 11:42:06pm
I ve just been made aware that I need to write a specification for a program that I have to write.
|
||||||
![]() 3756 Posts Member #: 1709 I like granny porn. LONDONSHIRE |
23rd Mar, 2010 at 12:40:33am
WTF.... On 2nd Oct, 2009 Vegard said:
On 1st Oct, 2009 Jimster said:
I bet my first wank came quicker than your first mini turbo These new modern turbos with their quick spool up time, would make the competition harder. On 15th Aug, 2011 robert said:
phew!!! thank you brett for smashing in my back doors .( not something i imagined writing... EVER) |
||||||
|
520 Posts Member #: 2093 Post Whore Grenoble, France |
23rd Mar, 2010 at 07:02:43am
remove your last % 60 operation and check instead that seconds are always < 60. If it happens then you messed up.
Edited by alpa on 23rd Mar, 2010. std 998 A+, g295, MD266, RHF4, 109hp @0.8bar/5400rpm |
||||||
![]() 16540 Posts Member #: 4241 King Gaycharger, butt plug dealer, Sheldon Cooper and a BAC but generally a niceish fella if you dont mind a northerner Rotherham, South Yorkshire |
23rd Mar, 2010 at 07:58:17am
The code is correct as far as c++, but as others have said the maths might be wrong. The easyest way to do something like this is to work out the equation on paper with numbers, then translate the numbers into variables, then just move it into your code.
On 11th Feb, 2015 robert said:
i tried putting soap on it , and heating it to brown , then slathered my new lube on it
|
||||||
|
520 Posts Member #: 2093 Post Whore Grenoble, France |
23rd Mar, 2010 at 09:47:08am
apbellamy, most of industrial applications are written in C and C++, especially those sold for more than $1000 per license. When you use some c# or ruby or any other flavor of the the modern trend there is quite often something else running behind your application, and this one was written in C/C++ (I write in C/C++ for living).
Edited by alpa on 23rd Mar, 2010. std 998 A+, g295, MD266, RHF4, 109hp @0.8bar/5400rpm |
||||||
|
499 Posts Member #: 2257 Senior Member Brighton |
23rd Mar, 2010 at 09:56:40am
i may have to pick your brains in the future Alpa. I apologise in advance :p |
||||||
![]() 12307 Posts Member #: 565 Carlos Fandango Burnham-on-Crouch, Essex |
23rd Mar, 2010 at 11:20:51am
Thanks Alpa,
On 28th Aug, 2011 Kean said:
At the risk of being sigged... Joe, do you have a photo of your tool? http://www.turbominis.co.uk/forums/index.p...9064&lastpost=1 https://joe1977.imgbb.com/ |
||||||
![]() 12307 Posts Member #: 565 Carlos Fandango Burnham-on-Crouch, Essex |
23rd Mar, 2010 at 11:24:49am
Andy,
On 28th Aug, 2011 Kean said:
At the risk of being sigged... Joe, do you have a photo of your tool? http://www.turbominis.co.uk/forums/index.p...9064&lastpost=1 https://joe1977.imgbb.com/ |
||||||
|
1267 Posts Member #: 831 Post Whore Montreal, Canada |
23rd Mar, 2010 at 02:13:07pm
That definitely looks better (and correct).
|
||||||
|
520 Posts Member #: 2093 Post Whore Grenoble, France |
23rd Mar, 2010 at 07:07:44pm
Well now that you made the final version: usually you won't do this way because you'll want to translate the wall clock second number (# of seconds from 1970) you got from the system. And you'll do that using standard C functions.
Edited by alpa on 23rd Mar, 2010. std 998 A+, g295, MD266, RHF4, 109hp @0.8bar/5400rpm |
||||||
|
Forum Mod ![]() 1927 Posts Member #: 1761 Stalker Bristol |
23rd Mar, 2010 at 07:37:03pm
Here it is in java :)
|
||||||
|
1267 Posts Member #: 831 Post Whore Montreal, Canada |
23rd Mar, 2010 at 08:17:39pm
Carl, you don't need the modulo 3600 when computing secondsOut.
|
||||||
|
Forum Mod ![]() 1927 Posts Member #: 1761 Stalker Bristol |
23rd Mar, 2010 at 08:22:54pm
I wrote that about 2 years ago Jean, I just remembered that I did a similair thing, so cut and pasted it from my old code archive!
|
||||||
|
520 Posts Member #: 2093 Post Whore Grenoble, France |
23rd Mar, 2010 at 08:44:07pm
Yes I know. Philips is NXP, Siemens is Infineon, SGS Thomson is STMicro. Fairchild MOS and Mostec and many others are dead, I've heard that somewhere :) . Intel is still Intel, I wonder why. std 998 A+, g295, MD266, RHF4, 109hp @0.8bar/5400rpm |
||||||
|
Site Admin 6295 Posts Member #: 1 The boring bloke who runs this place. Berkshire |
23rd Mar, 2010 at 09:33:42pm
Games are all still written in C++, too. |
||||||
| Home > Help Needed / General Tech Chat > anyone write C++? | |||||||
|
|||||||
| Page: |






