How to use PlaySound in C?

Let’s learn how to use PlaySound in C. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

use PlaySound() in C++/OpenGL to play sound in background

I am trying to play a wav file in the background of a game built in c++ with opengl. I am using the following line to play the wav file: PlaySound("starwars.wav", NULL, SND_FILENAME|SND_LOOP); The problem is when the music starts the animation stops. I tried starting the music at the press of a keyboard button, but when I do that the music starts and the all the animation stops. Is there a way to avoid this? I just want some music to play in the background and PlaySound seemed the simplest...

Answer:

You want to pass in SND_ASYNC This would make PlaySound return immediately, rather than waiting for...

Read more

biggdman at Stack Overflow Mark as irrelevant Undo

Other solutions

I use Java at my work place, but C++ is my first love. Aside from that I have a strong desire to learn Javascript and Python. How would a good plan look in this situation if I have only 1 year left in order to land an internship in Silicon Valley?

I use Java (JEE) at my work place. I also used Java for all the projects I have done until now (not many). The problem is that Java lands only jobs in multinational outsourcing companies (like the one I work in now) where the majority of people are just...

Answer:

If your goal is to work in Silicon Valley, not write code in one language instead of another, then my...

Read more

Travis Addair at Quora Mark as irrelevant Undo

why is everything is stored in my (c) drive how can i use the (d) drive before the (c) drive is full?

hi - i have two local disk drives for storage on my pc... local disk (c) total size 14.4 gb. free size 1.77gb local disk (d) total size 60.0 gb. free size 59.9 gb i dont know why everything is stored in the (c) drive my question is how can i use the...

Answer:

The reason everything is on your C drive is because it is your primary or master drive. Programs, files...

Read more

bass-ears at Answerbag.com Mark as irrelevant Undo

How to use allegro 5.06 for Visual C++ Express 2010?

How do you use allegro for Visual C++ Express 2010?? I tried on way, but it was for 5.05 Can you tell me how to use it(Please no video unless there is commentary). \ Also, i tried another way, but only after i tried it,did i realize that it was for ...

Answer:

Use it when it comes to creating the new project for your work... Good luck!

Read more

Trock at Yahoo! Answers Mark as irrelevant Undo

How to use C++ Language?

Ok so I want to know how to use C++ and what I can do with it. If you have any websites that can help me use it, please tell me. What can I do with C++? Is the language hard to learn? WHAT PROGRAM DO I USE TO WRITE AND PROGRAM THE C++ LANGUAGE? Try to...

Answer:

This is not something anyone is going to answer quickly. Google. Start here. http://www.cplusplus.com...

Read more

Anson at Yahoo! Answers Mark as irrelevant Undo

HELP with my c++. how to use string, if-else, or SWITCH.?

this is my project in school. i am trying to make a program that would compute for molarity and molality, using either grams or moles. when the user would give out grams, i was suppose to ask for which element so that the program i would make would compute...

Answer:

cplusplus.com best site i would like to call book in c++ programming visit

Read more

jai at Yahoo! Answers Mark as irrelevant Undo

How do you use C or C++ or Java for web scripting, to replace languages like PHP?

I'm familiar with all the three, and can write command line based programs in them but I never got to know how would one use them for web programming. I've heard FB uses a lot of C++ on their backend, and Google too. But I can't seem to find a tutorial...

Answer:

You can use C,C++ as a backend.You can associate same codebase in business-logic layer via web services...

Read more

Ravi Raj at Quora Mark as irrelevant Undo

How do I use double in C?

char a; int b; double c; getchar(); printf("insert a char\n"); getchar(); scanf("%c", &a); printf("\n"); printf("insert an int\n"); scanf("%i", &b); printf("insert a double\n"); scanf...

Answer:

Two basic problems: - the getchar call after you prompt for a char is discarding the entered character...

Read more

DLV at Yahoo! Answers Mark as irrelevant Undo

Answer:

I am sure there are tons of people that can help, but none are probably perusing the language forum...

Read more

Tobii at Yahoo! Answers Mark as irrelevant Undo

In C, how do I use scanf to read an equation in the format Ax+By=C?

I want the program to extract A, B and C from the equation ONLY if the input is in this format. Also, spaces are allowed but not between the variables to the coefficients: 5x + 5y= 3 is fine 5 x + 5 y = 3 should return an error. I tried scanf("...

Answer:

You cannot do that with scanf! It's much easier to do it with regular expressions. If you don't know...

Read more

giladbr at Yahoo! Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.