CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

12
Return to list New
Author: aku_EnSeM

C++ Programming

[Copy link]
Post time 11-10-2006 09:49 AM | Show all posts
preference sendiri laa.. heheeh
Reply

Use magic Report


ADVERTISEMENT


Post time 11-10-2006 10:31 AM | Show all posts

helllo semua....kago nak mintak tolog korang ni.......
ade tak sesape yang boleh tolong kago buat kan sesuatu....

k cam ni kago nak program kan kagonye litar........dalam microcontoller......ade tak sesape boleh tolong buat kan...kalau ade sile pm.kago atau ym [email protected]
Reply

Use magic Report

Post time 12-10-2006 09:48 PM | Show all posts
1.Create a class time that has separate it member data for hours, minutes and
seconds. One constructor should initialize this data to 0, and another should
initialize it to fixed values. Another member function should display it in
11:59:59 format. The final member function should add two objects of type time
passed as arguments.
A main( ) program should create two initialized time objects and one that isn抰
initialized. Then it should add the two initialized values together, leaving the
result in the third time variable. Finally it should display the value of this third
variable.

nak tanya,macam mana nak buat supaya yang dalam construct to dapat masok dalam member function?plisss pliss help me!
Reply

Use magic Report

Post time 12-10-2006 11:29 PM | Show all posts
Originally posted by adziah at 12-10-2006 09:48 PM
1.Create a class time that has separate it member data for hours, minutes and
seconds. One constructor should initialize this data to 0, and another should
initialize it to fixed values. Another  ...


try aa buat duluu..hehehe

die dah bagi hint tuu.. constructor tuu.. die bukan nak default constructor tuu..


  1. Time::Time(int hours, int minutes, int seconds)
  2. {
  3.         if (0 <= hours && hours < 24)
  4.                 hr = hours;
  5.         else
  6.                 hr = 0;

  7.         if (0 <= minutes && minutes < 60)
  8.                 min = minutes;
  9.         else
  10.                 min = 0;

  11.         if (0 <= seconds && seconds < 60)
  12.                 sec = seconds;
  13.         else
  14.                 sec = 0;
  15. }
Copy the Code
Reply

Use magic Report

Post time 13-10-2006 02:07 AM | Show all posts
owhhh!!ok ok ok..thanks!
Reply

Use magic Report

12
Return to list New
You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic
...HUMANITARY CHAT...
seribulan...HUMANITARY CHAT...
Views : 33910 Replies : 750
DAILY WISDOM TO YOU - YOU CAN
adila39DAILY WISDOM TO YOU - YOU CAN
Views : 220706 Replies : 627
V82: HANIS HAIZI B. ABD HAMID Cara Report to ICE (USA IMMI) on post #3566
anony-mousV82: HANIS HAIZI B. ABD HAMID Cara Repor
Views : 105856 Replies : 4662
Datuk Red dah tak ada duit, pasrah Adira kahwin dengan lelaki kaya
RalineDatuk Red dah tak ada duit, pasrah Adira
Views : 11072 Replies : 15
AcikPor Mendonia di Threads. Setujukah anda?
Tinot7AcikPor Mendonia di Threads. Setujukah a
Views : 31797 Replies : 15
madu2 gula Tok Matahari
aaanf14madu2 gula Tok Matahari
Views : 140969 Replies : 1491
Hanya 25 % rakyat Malaysia pakai tali pinggang ketika memandu.Apa yang berlaku?
YgBenarHanya 25 % rakyat Malaysia pakai tali pi
Views : 13880 Replies : 3
Shukri Yahaya sengaja kusutkan rambut untuk buat penonton benci
RalineShukri Yahaya sengaja kusutkan rambut un
Views : 9903 Replies : 11
Acikpor vs. Ngai, menanti penerbangan khas di balai ketibaan
maklukpenggodaAcikpor vs. Ngai, menanti penerbangan kh
Views : 177686 Replies : 6133
Harga emas dijangka catat paras tertinggi baru RM434.19 segram
RalineHarga emas dijangka catat paras tertingg
Views : 20764 Replies : 129

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

6-2-2025 09:21 AM GMT+8 , Processed in 0.049433 second(s), 17 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list