Access violation in C++

This is a discussion on Access violation in C++ within the C++ Programming forums, part of the General Programming Boards category; I have been trying to resolve the access violation in the program for bounding volume hierarchy. Which takes an 3-D ...

  1. #1
    Banned
    Join Date
    Jul 2011
    Posts
    12

    Access violation in C++

    I have been trying to resolve the access violation in the program for bounding volume hierarchy. Which takes an 3-D object "statue.ply" and creates a bounding volume hierarchy through which a ray tracer is used. I get an access violation error while running it. I have used SDL and lib3d packages.
    I'm using visual studio 2010 on windows 7

    >Error: Unhandled exception at 0x00fa2e80 in bvh.exe: 0xC0000005: Access violation reading location 0x00000004.

    Call Stack :> `bvh.exe!Triangle::Triangle(const Vertex * vertexA, const Vertex * vertexB, const Vertex * vertexC, unsigned int r, unsigned int g, unsigned int b, bool twosided, bool triNormalProvided, Float3 triNormal)` Line 393 + 0x150 bytes C++

    here is the link to my code [c++] BVH_SAH - Pastebin.com
    can anyone help with it.

    Thank you

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,012
    You haven't posted your code. Also, you claim this is C++, so why did you post in the C section?
    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.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by Sjvlsdsd View Post
    here is the link to my code [c++] BVH_SAH - Pastebin.com
    Really?
    Quote Originally Posted by Sjvlsdsd View Post
    can anyone help with it.
    Apparently not?


    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    Moved to C++ programming forum.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Access violation in std::map
    By Dark_Phoenix in forum C++ Programming
    Replies: 7
    Last Post: 08-16-2009, 01:02 PM
  2. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 02:30 PM
  3. Why am I having an access violation?
    By ldb88 in forum C++ Programming
    Replies: 12
    Last Post: 06-12-2007, 01:27 PM
  4. DLL Access Violation?
    By durban in forum C++ Programming
    Replies: 12
    Last Post: 10-04-2005, 06:55 PM
  5. Access Violation!!
    By Yoshi in forum C++ Programming
    Replies: 4
    Last Post: 09-11-2002, 02:22 PM

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