I know I'm new to the forums, but I think your question would be best answered in the Programming > C-C++ section. Having said that..I'll take a look at your problem when I'm more sober