hongjun
asked on
MACRO Problem
I have defined a macro and have encountered a problem using it. Below is the macro I have defined.
#define BULLET PlaySound("bullet.wav",NUL L,SND_FILE NAME|SND_A SYNC)
I then try to use it and is successful.
void main()
{
...
BULLET; // run the macro
...
}
The above works and I heard the sound of one bullet.
However, when I tried to run the macro twice consecutively, it is unsuccessful.
void main()
{
...
BULLET; // run macro
BULLET; // another time
...
}
I expect to hear two bullets sound but I only hear one bullet sound.
Why?
hongjun
#define BULLET PlaySound("bullet.wav",NUL
I then try to use it and is successful.
void main()
{
...
BULLET; // run the macro
...
}
The above works and I heard the sound of one bullet.
However, when I tried to run the macro twice consecutively, it is unsuccessful.
void main()
{
...
BULLET; // run macro
BULLET; // another time
...
}
I expect to hear two bullets sound but I only hear one bullet sound.
Why?
hongjun
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hongjun