CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Posts
    1

    Code will not compile

    For the life of me I cannot get this code to compile. It could be because I am more used to running code on JS and VisualBasic, but its not running. I've attached a copy of the code, if anyone is interested in pulling this apart and figuring out whats wrong with it I would greatly appreciate it. It should be a simple problem. I do have a copy of the js code, which runs, if you wish to request that please pm me.
    Attached Files Attached Files

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Code will not compile

    Please don't post links to code. If there is a lot of code, post the relevant sections. Use CODE tags when posting code (see my sig, below).

    If you want help with error messages, post the full error message text, and stack trace if present.

    In theory, there is no difference between theory and practice, but not in practice...
    Anon.
    Last edited by dlorde; March 25th, 2011 at 05:01 PM.
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Mar 2011
    Location
    Dunwoody GA
    Posts
    8

    Re: Code will not compile

    There are several reasons your code will not compile. Beyond getting it compile you have some additional problems but I'll leave that to you to ponder.

    You define a public class Zone in the same file as your public class Darkness. The Zone class needs to be in a seperate file, otherwise you need to remove the public declaration and let the class be an inner class. You declare instances of class "zone" but your class starts with an upper case Z ("Zone").

    Ray

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured