I would probably have one main while loop.
while(move<63)
then use if statements to check to see if the piece is within the boundaries, and if the next space is available.
Where each statement says break (the knight can't move to the given position), instead of exiting the while loop, you could...
Hi,
The program's not perfect, but it runs. When you access arrays, remember to start with 0 and not 1. If you make an array of size 2, then you access the elements 0 and 1.
int testarray[2] = {16, 25};
testarray[0] is 16;
testarray[1] is 25;
testarray[2] is out of bounds (error).
There...
What variables do you pass from the Winmain function to the constructor, and from the constructor to the private function?
-Dave http://home.attbi.com/~djones7936/index.htm
Hi
I have a weird problem. I have a program that loads about 20-30MB worth of arrays using the new operator, the program does some processing, then it uses the delete operator to release the all of the said memory that was allocated. My understanding is the delete operator unallocates memory...
I see,
Correct me if I'm wrong,
When I include <.h> (standard .h files), the .h file refers to already compiled code which is stored in a ".lib" file.
When I include ".h" (my custom made .h files), it refers to already compiled code in an .obj file.
(The corresponding...
Thank you Mongoose,
The .cpp extension works.
That's weird. When I deal with classes without templates, (and as with most cases in C++) files are #included with ".h" extension. The class's source code is in a .cpp file, but it is still accessible from other files (such as main.cpp)...
Does anybody know why template code will not compile unless the class declaration and actual class code is in the same file? In other words, if I separate the class into two files .h(header) and .cpp (source file), the code does not run.
Here is an example of that I'm talking about. I've tried...
...+ (char) 13 + (char) 10);
}
}
Hang in there, almost done!
Although this code has only about 15 lines of effective code, it is very powerful. ***I would recommend uncommenting the 3 textBox statements and MessageBox statement to see what is going on in the subroutine.***
The code takes...
I forgot to add
string[] test;
at the top of the code.
It creates an array of strings with the name "test".
A filename is stored in each element of the array. -Dave
http://home.attbi.com/~djones7936/index.htm
Hello Kenny,
I was able to copy an entire directory of files over to another directory using this code:
test = System.IO.Directory.GetFiles("C:\\test1");
foreach(string t in test)
{
System.IO.File.Copy(t, "f:\\test2\\" + System.IO.Path.GetFileName(t) );
//TextBox...
Hi jabz,
For the TV-out, I noticed the video card didn't detect my older monitor. My old monitor wasn't plug n play ready and didn't have any of the new monitor certifications. I used a newer monitor and never had the problem again.
When you plug a plug n play monitor into a computer for the...
I figured it out!
Your py project files can't have the same name as Python's module files! (Heavenly hymn) Ooops
I tried running a code example from the Internet in the same folder that my random project (random.py) was residing. The example tried importing my project(random.py) rather than...
Does the video card have TV-Out or two monitor option? I had a video card that kept switching to TV-out rather than monitor-out at boot up for some reason.
-Dave http://home.attbi.com/~djones7936/index.htm
...can change it to 133mhz. (266mhz bus)
Make sure your CPU multiplier is set, I believe it should be 12x (or 6x) but double check that. 133mhz*12 about 1600mhz
Make sure all of your CPU stuff is enabled (Cache, etc).
I know with EPOX and ASUS, there needs to be motherboard drivers needs to...
I would goto http://www.ibm.com, go to their support section and find their hard drive diagnostic software. I believe it's called Drive Fitness Test (DFT).
http://www.storage.ibm.com/hdd/support/download.htm
After it downloads it, it will probably takes one floppy disk. You boot your computer...
I have an EPOX with Avance on-board sound. If you have a card, then I would look for any information on the card: make, model number, chipset information.
Maybe ALC### or ALS### on one of the chips, (# is a digit). If you can find that, I would goto http://www.avance.com/ - Drivers - Graphics...
Hello,
I'm new to Python.
When I open a fresh shell and type:
>>> import random
>>> print random.random()
the code works.
If I put those same two lines into a .py file and try to run the program (both from the command line or from a new window in Python's shell), I get an error message...
Hi haroonkhalid,
.NET runtime works with Windows 98/ME/2000/XP and NT4 SP6a. Windows 95 isn't supported.
Here is a link to .NET Framework Frequently Asked Questions [http://www.eponymous.eclipse.co.uk/dotnetfaq.htm] where I got the information.
Section 1.6 includes information about which...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.