c4430

This is a discussion on c4430 within the C++ Programming forums, part of the General Programming Boards category; getting an error c4430 on the following line Code: operator =( DWORD value ) { // <---- this is where ...

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189

    c4430

    getting an error c4430 on the following line

    Code:
    operator=( DWORD value )
       {  // <---- this is where the error is reported
       return Set(value, TRUE);
       };
    I think they guy was trying to do automatic type conversion, but im unfamiliar with this practice so I don't know how to fix the problem.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    operator=() doesn't specify a return type.
    Find out what Set() returns and use that as the return type.

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,449
    Doesn't the error message tell you all about the error? Or perhaps you are unfamiliar with Visual Studio errors...
    Quote Originally Posted by MSDN
    C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by cpjust View Post
    operator=() doesn't specify a return type.
    Find out what Set() returns and use that as the return type.
    ok, i changed it to
    Code:
    HRESULT operator= etc.
    


    seems to not give an error naymore at least, not tellign if that fixed it.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,449
    You would get an error if the return type is incorrect since you'd be returning an incorrect type.
    I'd say it's fixed unless the function is returned a faulty value in the first place.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by Elysia View Post
    You would get an error if the return type is incorrect since you'd be returning an incorrect type.
    I'd say it's fixed unless the function is returned a faulty value in the first place.
    Unfortunately there are about 150 other compile errors to fix before I will know. The previous programmer was a ........nut retard. None of his code is portable from 6.0 to 2005 let alone from Win32 to Win64 or Linux.

    Not that most of my code is portable to linux, but thats just because I make heavy use of the Win32 API, its syntactically portable if one where to impliment the functions I call.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. #include <string> not working?
    By bulletbutter in forum C++ Programming
    Replies: 7
    Last Post: 04-26-2008, 12:46 AM
  3. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 02:49 PM
  4. Class Include Problem (I Think)
    By gpr1me in forum C++ Programming
    Replies: 8
    Last Post: 03-21-2006, 11:47 AM
  5. DirectSound header issues
    By dxfoo in forum C++ Programming
    Replies: 0
    Last Post: 03-19-2006, 06:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21