finding the error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • panda11321
    New Member
    • Nov 2009
    • 1

    finding the error

    it says there is an error here in the bool line... expected ; before (

    Code:
    #pragma once
    
    class LostHiker
    {
        private:
            int ns_coord; 
            int ew_coord;
        
        public:
            //constructors
            LostHiker();
            LostHiker(int newNS, int newEW);
            //moves person once
            void random_move(const int SIZE);
            //true or false (found?)
            bool is_found(Searcher const& parameter); 
        
    };
    
    
    not sure what I'm calling wrong:
    
    deploy_searchers(hikerArray[], NUM_HIKERS, helisArray[], NUM_HELIS, GRID_SIZE);
    
    here's the fxn.
    
    void deploy_searchers(Searcher hikersArray[], int size, Searcher const helisArray[], int heliSize, int gridSize)
    {
        for(int i=0; i>gridSize; i++)
        {
            hikersArray[i] = Searcher(gridSize);
        }
    }
    Last edited by Banfa; Nov 15 '09, 10:45 PM. Reason: Added [code] ... [/code] tags
  • RRick
    Recognized Expert Contributor
    • Feb 2007
    • 463

    #2
    bool line??

    Do you mean line 16 in the code section. If so, then the compiler is annoyed about the Searcher object.

    Also, line 31 looks like its missing a "new" before Searchers.

    Comment

    Working...