Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6193697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:09:53+00:00 2026-05-24T03:09:53+00:00

#include base.h #include <Poco/SharedPtr.h> #include <Poco/AutoPtr.h> #include <vector> using Poco::SharedPtr; using Poco::AutoPtr; namespace kroll

  • 0
#include "base.h"
#include <Poco/SharedPtr.h>
#include <Poco/AutoPtr.h>
#include <vector>

using Poco::SharedPtr;
using Poco::AutoPtr;


namespace kroll
{
    class Value;
    class KObject;
    class KMethod;
    class KList;

    class StaticBoundObject;
    class StaticBoundMethod;
    class StaticBoundList;

    class GlobalObject;
    class ScopeMethodDelegate;
    class Bytes;
    class VoidPtr;
    class ValueReleasePolicy;
    class Logger;
    class ArgList;

    template <class C>
    class KAutoPtr : public AutoPtr<C>
    {
    public:
        KAutoPtr() : AutoPtr()
        {}

        KAutoPtr(C* ptr) : AutoPtr(ptr)
        {}

        KAutoPtr(C* ptr, bool shared) : AutoPtr(ptr, shared)
        {}

        KAutoPtr(const AutoPtr& ptr) : AutoPtr(ptr)
        {}

        /*KAutoPtr& operator = (const AutoPtr& ptr)
        {
            return assign(ptr);
        }*/

#ifdef DEBUG
        //This is used in debug builds as a workaround to release all memory
        //before VS debugger incorrectly dumps it as memory leak.
        KObject* release()
        {
            KObject* t = _ptr;
            _ptr = 0;
            return t;
        }
#endif
    };

I get the following errors:

kroll/libkroll/kroll.h:66: error: expected ',' or '...' before '&' token
kroll/libkroll/kroll.h:66: error: ISO C++ forbids declaration of 'AutoPtr' with no type
kroll/libkroll/kroll.h: In constructor 'kroll::KAutoPtr<C>::KAutoPtr()':
kroll/libkroll/kroll.h:57: error: class 'kroll::KAutoPtr<C>' does not have any field named 'AutoPtr'
kroll/libkroll/kroll.h: In constructor 'kroll::KAutoPtr<C>::KAutoPtr(C*)':
kroll/libkroll/kroll.h:60: error: class 'kroll::KAutoPtr<C>' does not have any field named 'AutoPtr'
kroll/libkroll/kroll.h: In constructor 'kroll::KAutoPtr<C>::KAutoPtr(C*, bool)':
kroll/libkroll/kroll.h:63: error: class 'kroll::KAutoPtr<C>' does not have any field named 'AutoPtr'
kroll/libkroll/kroll.h: In constructor 'kroll::KAutoPtr<C>::KAutoPtr(int)':
kroll/libkroll/kroll.h:66: error: class 'kroll::KAutoPtr<C>' does not have any field named 'AutoPtr'
kroll/libkroll/kroll.h:66: error: 'ptr' was not declared in this scope
kroll/libkroll/kroll.h: In member function 'kroll::KObject* kroll::KAutoPtr<C>::release()':
kroll/libkroll/kroll.h:79: error: '_ptr' was not declared in this scope

line 66 is KAutoPtr(const AutoPtr& ptr) : AutoPtr(ptr)

I am using the command line i686-apple-darwin10-gcc-4.2.1 to compile the code on MAC OS X 10.6.7 machine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:09:54+00:00Added an answer on May 24, 2026 at 3:09 am

    Line 66 should be this:

    KAutoPtr() : AutoPtr<C>()
    

    And similarly for the other constructor calls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#include <iostream> using namespace std; class Base { public: Base(){cout <<Base<<endl;} virtual ~Base(){cout<<~Base<<endl;} virtual
when accessing foo() of base using derived class's object. #include <iostream> class base {
I have the following code: #include <iostream> #include boost/shared_ptr.hpp using boost::shared_ptr; class Base {
I have a model, Show and a module Utilities class Show < ActiveRecord::Base include
I read about using <context:component-scan base-package=tld.mydomain.business> <context:include-filter type=annotation expression=org.springframework.stereotype.Service/> </context:component-scan> and annotate my service
The following code prints 20, i.e. sizeof(z) is 20. #include <iostream.h> class Base {
My application controller looks like this class ApplicationController < ActionController::Base include AuthenticatedSystem helper :all
I have a simple validation: class Product < ActiveRecord::Base # include ActionView::Helpers::NumberHelper ... validates_numericality_of
I thought class ApplicationController < ActionController::Base include Foo is to add a mixin --
I'm trying to create a base class for my POCO objects in .NET 4,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.