Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to play sounds on Visual c++ 6.0

Posted on 2003-11-07
2
Medium Priority
?
493 Views
Last Modified: 2010-04-01
I am used to turbo c++ 3.0

My school uses visual c++ 6 so i want to convert all my files to visual 6.
But my files only work on DoS environments. I need the header files that would replace my DoS files from turbo to visual.

This is hard becouse Visual didnt work the graphics and sound that I had so i need the headers and the syntax examples that would call sound.

Im used to

playsound(45);
delay(100);
from my turbo c 3.0

i have no idea what to include and use for sound in Visual c++ 6.0
0
Comment
Question by:blacken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
n_fortynine earned 75 total points
ID: 9704637
Try this:

#include <mmsystem.h>                 /* For PlaySound */
#pragma  comment(lib, "winmm.lib")    /* Linking to Sound DLL */

PlaySound("click.wav", NULL, SND_FILENAME | SND_ASYNC);

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question