Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

In Visual Studio 2005, is there any such thing as array bounds checking?

I keep accidentally stepping on things by exceeding my array bounds in Visual Studio 2005 (C++). Is there a switch I can flip somewhere in the environment so that the IDE will throw up a flag if I try to exceed my array bounds?

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    Well I am not sure about C++

    But in VB and C# you can use the TRY CATCH statment to catch errors

    For example (not sure of C++ syntax)

    {

    TRY

    *add item to array here*

    Catch EX as exception

    messagebox.show(EX.tostring)

    End try

    }

    Maybe this well help, good luck!

Still have questions? Get your answers by asking now.