Alarm clock C/C ++ version

Source: Internet
Author: User
/* Alarm Clock MP3 player by Johnathan Brown (legend28469) set a time .. when the system time is the same as the time setplay an mp3date: Thursday, February 27,200 9 -- Am (Est time) Date: the processing of the menu number at on 2013 07 11 is a highlight */# include <iostream> // input output # include <ctime> // to get the system time # include <fstream>/ /If wishing to load a previous wake time # include <string> // hold the filename infousi Ng namespace STD; // global .. and localtime_t S = Time (null); // getting ready for timetm T = * localtime (& S); // getting time put into variable tbool displayintro () {cout <"*********************************** * ********** \ n "; cout <"******* legend28469's alarm clock ********* \ n "; cout <"******************* version 1.0 **************** * \ n "; cout <"Johnathan brown Productions .. \ n "; // not much to explain .. se Lf explanatorycout <"Instructions for use: \ npick an option in the menu... have fun !! \ N "; System (" pause "); // wait for an entersystem (" CLS "); // clear screenreturn true;} bool settime () {// hold time in memory (to wake up) system ("CLS"); // clear system screencout <"the current time is:" <t. tm_hour <":" <t. tm_min; cout <"\ NIF this time is incorrect then please set your system time \ n"; System ("pause"); // give time to readint hour; // hold the hour somewhereint min; // hold the Minu Te somewherestring MP3; // hold the name of the MP3 in herecout <"\ n "; // clear a few linescout <"What hour wocould you like to wake up at [24 hr format]:"; CIN> hour; // put input into hourcout <\ nwhat minute wowould you like to wake up at: "; CIN> min; // put input into mincout <"\ nplease type the full path of the media file to open \ Nfor example:"; cout <"C :\\ cannonut \ n "; cout <"it Must be in C: And no spaces allowed \ n "; cout <" please type it here --> "; CIN> MP3; cout <"\ ninitializing alarm clock... \ n "; cout <" alarm clock in progress... to wake you up at "

 
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.