• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Directx

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Directx

    Not realy a technical issue, but a mate has a lad (Robert) learning directx with C and C++ he has a project to draw a 4 sided pyramid (which works) but his solutionis smart enough to take user input for the number of sides.
    Can anybody propose what may be occuring given the following.
    Run the program

    Robert inputs a 3
    The program draws a pyramid with a 3 sided base
    All is well, Hurrah
    Run the program

    Robert inputs a 6
    The program draws a pyramid with a 6 sided base
    All is well, Hurrah
    Run the program

    Robert inputs a 7
    The program draws a pyramid with a 7 sided base
    All is well, Hurrah




    Run the program

    Robert inputs an 8 (or more)
    The program crashes reporting a memory error
    Oh Dear.
    I am not qualified to give the above advice!

    The original point and click interface by
    Smith and Wesson.

    Step back, have a think and adjust my own own attitude from time to time

    #2
    Originally posted by The Lone Gunman View Post
    Not realy a technical issue, but a mate has a lad (Robert) learning directx with C and C++ he has a project to draw a 4 sided pyramid (which works) but his solutionis smart enough to take user input for the number of sides.
    Can anybody propose what may be occuring given the following.
    Run the program

    Robert inputs a 3
    The program draws a pyramid with a 3 sided base
    All is well, Hurrah
    Run the program

    Robert inputs a 6
    The program draws a pyramid with a 6 sided base
    All is well, Hurrah
    Run the program

    Robert inputs a 7
    The program draws a pyramid with a 7 sided base
    All is well, Hurrah




    Run the program

    Robert inputs an 8 (or more)
    The program crashes reporting a memory error
    Oh Dear.
    Thank you for your query to the CUK technical help line
    Put the code in and we'll debug it.

    Comment


      #3
      If he runs it through a debugger, he should be able to see what's causing the memory error rather than just poking about blindly in the dark.

      Comment


        #4
        Originally posted by The Lone Gunman View Post
        Robert inputs an 8 (or more)
        The program crashes reporting a memory error
        Oh Dear.
        MS decided 3 bits would be enough for anyone

        Comment


          #5
          It's well known you need SP2 for 8 sided polygons.

          HTH

          Comment

          Working...
          X