Thread: confusing errror

  1. #1
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638

    confusing errror


    Error E2084 ackubberphest0001.c 11: Parameter names are used only with a functio
    n body
    dose that mean i have to use parameter names with function body or dose that mean that using the parameter name with a function body is the problem?

    here is the line of code. you should know i was trying something different playing around with this. to see what works.
    Code:
    LRESULT CALLBACK  CreateDialog( HINSTANCE hInstance, LPTSTR MAKEINTRESOURCE(IDD_ActUbberPhestDialogBox) , HWND hWnd, DLGPROC Dialogboxproc  );

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Is that supposed to be a function call or a function declaration?

    As it is, it's mixing elements of both, together with some completely invalid stuff.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    You can just declare it like this:
    Code:
    LRESULT CALLBACK  CreateDialog( HINSTANCE, LPTSTR, HWND, DLGPROC );
    I don't really understand what LPTSTR MAKEINTRESOURCE(IDD_ActUbberPhestDialogBox) should do. After the variable type there should be the variable name, not some already existing variable. So that thing after LPTSTR will be a pointer to an LPTSTR. I don't think it's legal.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    i was mixing. i was trying to do everything on one line to shorten the dialog code. i wanted to see if i could get it working. thought that was what the error meant. will go back and do it correctly now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scanf is confusing me.
    By babelosopher in forum C Programming
    Replies: 10
    Last Post: 07-12-2007, 04:22 PM
  2. Most confusing language
    By Suchy in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 04-22-2007, 09:08 PM
  3. Confusing Pointer
    By loko in forum C Programming
    Replies: 4
    Last Post: 08-29-2005, 08:52 PM
  4. pointers are confusing!
    By ali1 in forum C Programming
    Replies: 10
    Last Post: 09-07-2004, 10:41 PM
  5. functions declaration, pointers, cast, .... CONFUSING
    By Rhodium in forum C Programming
    Replies: 7
    Last Post: 01-09-2003, 06:21 AM