Thread: DirectSound problem

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    27

    DirectSound problem

    Code:
    #ifndef _LPCWAVEFORMATEX_DEFINED
    #define _LPCWAVEFORMATEX_DEFINED
    typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
    #endif // _LPCWAVEFORMATEX_DEFINED
    I am using Visual Studio 2005 to do some DirectX programming. I tried to include the dSound.h file and its accompanying .lib, but the compiler complains about this piece of code. I get errors that say:

    C4430: missing type specifier - int assumed
    C2061: syntax error: identifier LPWAVEFORMATEX
    C2061: syntax error: identifer LPCWAVEFORMATEX
    C2143: missing ';' before *
    C2146: missing ';' before identifier 'lpwfxformat'

    All of these errors stem from the header file. I have not added any code at all since I included dSound.h so I know it isn't anything in my main .cpp file. I only tried to compile after I included the header and got these errors. I don't know what the problem is and I don't know enough to putz around with this; does anybody here know what I can do to get this header file to compile properly, so I can use it in my program?

  2. #2
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Code:
    typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM