I suggest putting this into an SSCCE so we can compile it ourselves. This snippet leaves out a lot of valuable information that we need to answer the question. Also, list the errors you're getting-...