Unless I'm mistaken, you can only declare a variable ONCe in a given context. However, you are typically free to define and re-define it multiple times. See the following snippet: int my_integer; // a declaration my_integer = 4; // a definition my_integer = 8; // a re-definition (works) int my_integer; // a re-declaration (always fails)
Since you are working with an array pointer, and you can only use the {...} array initializer notation during declaration in C++ IIRC, then proper control of context should get you past this hurdle: // Scan dir2 and see if any file?.??c files are found { bool expected8[5] = { true, true, false, false, false }; scanTest(dir2, "file?.??c", expected8); } // Scan dir2 and see if any *.??c files are found { bool expected8[5] = { true, true, false, false, false }; scanTest(dir2, "*.??c", expected8); } Ricky Cron Stardust On Mon, Nov 1, 2010 at 7:58 AM, WolfPup Lowenhar <wolfpu...@earthlink.net> wrote: > For reference please see the following online repository: > > > > http://bitbucket.org/oz_linden/storm-102 > > > > and also, > > > > http://bitbucket.org/oz_linden/storm-102/src/tip/indra/llvfs/tests/lldir_test.cpp#cl-380 > > > > > > Code in question: > > > > // Scan dir2 and see if any file?.??c files are found > > bool expected8[5] = { true, true, false, false, false }; > > scanTest(dir2, "file?.??c", expected8); > > //bool expected8[5] = { true, true, false, false, false };// > re-initizalition will fail the build > > scanTest(dir2, "*.??c", expected8); > > > > Now the issue: > > 1. When building the test it fails. You can only build it in release > mode in visual studio as trying to build the test in particular in anything > else will cause the resulting exe to crash and burn on run. Also if you try > to the commented out step the build will fail no mater what. > > 2. With a working test program it will fail one of the tests no mater > hominy times you run it or even rebuild it. > > 3. When running a debug of the test for some odd reason it will start > trying to look at a null location causing the failure.(see attached debug > file) > > > > I need some help getting this test to work right and not fail on a windows > system. I welcome and help in this matter. > > _______________________________________________ > Policies and (un)subscribe information available here: > http://wiki.secondlife.com/wiki/OpenSource-Dev > Please read the policies before posting to keep unmoderated posting > privileges > _______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges