Thread: "new" causes access violation

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    "new" causes access violation

    I'm having some weird problems with Visual C++ .NET. Every new project I create has this problem, but not existing projects. The problem is that I cannot call 'new' at any point in the program. When new is called, I get this:
    Unhandled exception at 0x77f5171c in tester.exe: 0xC0000005: Access violation reading location 0x00000010.
    I used the repair installation option, which took ages, but nothing has changed. Any ideas?

    EDIT: I've also noticed another unusual behavior. Every time I create a new project, I have to set the Linker entry point manually. I previously did not have to do this. I now set it to "main".
    Last edited by bennyandthejets; 04-22-2004 at 07:04 AM.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    If I told you that I'd be programming for 8 years, would you believe it? Right now, I certainly wouldn't. This whole problem stemmed from the fact that I was using int main() instead of int WINAPI WinMain(..). I created about 7 different projects trying to get this crap to work, and each time, I was using int main(). DAMN.

    Problem solved.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    494
    i guess u laughted so much when u figured it out eheheh
    When no one helps you out. Call google();

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    lmfao, I guess it happens to the best of us..haha.
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

  5. #5
    Registered User
    Join Date
    May 2002
    Posts
    49
    !#$*^*(^*&(^^$%
    Nothing weird...
    Hello, everyone.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Access violation... can't figure it out...
    By Raigne in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2007, 10:52 AM
  2. Access violation when reading a string.
    By Desolation in forum C++ Programming
    Replies: 16
    Last Post: 05-01-2007, 10:25 AM
  3. FtpFileFind access violation with MS VC++ 6.0
    By earth_angel in forum C++ Programming
    Replies: 3
    Last Post: 09-22-2005, 07:02 PM
  4. Help! CListCtrl access violation
    By bonkey in forum Windows Programming
    Replies: 4
    Last Post: 11-18-2003, 02:40 PM
  5. 0xC0000005: Access Violation
    By Strider in forum Windows Programming
    Replies: 3
    Last Post: 11-07-2001, 02:46 PM