Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to add backsound in c ++? backsound that doesn't interfere with the running of the program? how to do it? this is my coding

how to add backsound in c ++? backsound that doesn't interfere with the running of the program? how to do it? this is my coding without the background sound's code

#include

#include

#include

#include

#include

int password();

void addrecord();

void viewrecord();

void editrecord();

void editpassword();

void deleterecord();

struct record

{

char time[6];

char name[30];

char place[25];

char duration[10];

char note[500];

} ;

int main()

{

int ch;

printf(\" \\t*********************************** \");

printf(\"\\t*PASSWORD PROTECTED PERSONAL DIARY* \");

printf(\"\\t***********************************\");

while(1)

{

printf(\" \\t\\tMAIN MENU:\");

printf(\" \\tADD RECORD\\t[1]\");

printf(\" \\tVIEW RECORD\\t[2]\");

printf(\" \\tEDIT RECORD\\t[3]\");

printf(\" \\tDELETE RECORD\\t[4]\");

printf(\" \\tEDIT PASSWORD\\t[5]\");

printf(\" \\tEXIT\\t\\t[6]\");

printf(\" \\tENTER YOUR CHOICE:\");

scanf(\"%d\",&ch);

switch(ch)

{

case 1:

addrecord();

break;

case 2:

viewrecord();

break;

case 3:

editrecord();

break;

case 4:

deleterecord();

break;

case 5:

editpassword();

break;

case 6:

printf(\" \\t\\tTHANK YOU FOR USING THE SOFTWARE \");

getch();

exit(0);

default:

printf(\" YOU ENTERED WRONG CHOICE..\");

printf(\" PRESS ANY KEY TO TRY AGAIN\");

getch();

break;

}

system(\"cls\");

}

return 0;

}

void addrecord( )

{

system(\"cls\");

FILE *fp ;

char another = 'Y' ,time[10];

struct record e ;

char filename[15];

int choice;

printf(\" \\t\\t*************************** \");

printf(\"\\t\\t* WELCOME TO THE ADD MENU *\");

printf(\" \\t\\t*************************** \");

printf(\" \\tENTER DATE OF YOUR RECORD:[dd-mm-yyyy]:\");

fflush(stdin);

gets(filename);

fp = fopen (filename, \"ab+\" ) ;

if ( fp == NULL )

{

fp=fopen(filename,\"wb+\");

if(fp==NULL)

{

printf(\" SYSTEM ERROR...\");

printf(\" PRESS ANY KEY TO EXIT\");

getch();

return ;

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Usability

Authors: Jakob Nielsen, Raluca Budiu

1st Edition

0133122131, 9780133122138

More Books

Students also viewed these Programming questions