Thread: Thou ark ........ed off...

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    920

    Angry Thou art ........ing me off...


    MSVC++ Is A Pain in the Ass!


    Hi. Glad to get that out of my system. Compiler says, "ERROR". I say, "Why?" Compiler says, "ERROR".

    Look, whenever I try to include the following file into my dialog file, it gives me the following error. I've investigated it and found no other definition of the class:


    --------------------Configuration: DnD - Win32 Debug--------------------
    Compiling...
    StdAfx.cpp
    Compiling...
    DnDDlg.cpp
    c:\program files\microsoft visual studio\myprojects\dnd\dndwinsock.h(6) :
    error C2011: 'SockHead' : 'class' type redefinition
    Generating Code...
    Skipping... (no relevant changes detected)
    DnD.cpp
    Error executing cl.exe.

    DnD.exe - 1 error(s), 0 warning(s)


    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////
    // WINSOCK CRAP (dndwinsock.h)
    #include <winsock.h>


    class SockHead
    {
    public:
    int InitiateSock()
    {
    char newName[200];
    WSADATA wsadata;
    WSAStartup(0x0101, &wsadata);
    hostent *name = gethostbyname("http://www.angelfire.com");
    sprintf(newName, "%d", name);
    MessageBox(NULL,newName,"Title",NULL);
    return 0;
    }

    int CloseSock()
    {
    WSACleanup();
    return 0;
    }
    protected:
    char newName[200];
    private:
    int NoneOfYourBusiness;
    };
    Last edited by CodeMonkey; 11-29-2001 at 02:37 PM.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  2. #2
    First of all, it's not ark, second of all, thou art ........ed off means that "you are ........ed off".

    Okay seriously though. Have you checked cases and everything? C++ is case sensitive, remember that. Also, you should try a different compiler, such as borland or something.
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    920

    Ok...

    I think it might have something to do with the class not having a base class. BTW, this is part of a windows program, so no matter how much I complain, I think MSVC++ is best for the job. Windows is so tedius without the visual editor.
    "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. Oh wonderful binary, where art thou?
    By cboard_member in forum C++ Programming
    Replies: 10
    Last Post: 07-15-2005, 12:00 PM
  2. NoO!! I am really ........ed off!!
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 05-20-2002, 05:40 AM
  3. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 03:38 PM
  4. Replies: 3
    Last Post: 11-17-2001, 08:16 AM