
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
you see the first
class object;
then definition of Container
and then definition of Object
I did not mean you switch the order of classes, just add the first statement
Sorry, I saw you did it just now.
Try adding class Container; before Object and class Object before Container.
There is no difference :(
class Object;
class Container { ... };
class Object { ... };
errors in compiling.
also as:
class Container;
class Object { ... };
class Container { ... };
also as:
class Container;
class Object;
class Object { ... };
class Container { ... };
and if i swap las two lines :(
Same if i use #includes
Again, not by my pc but definetly done it a lot.
By reading again your code, you try to assign a wrong object type.
WhatIsYourContainer() returns Container* but you assign it to Object*
Change it and try again
public:
Object* object;
double m_Price;
Container(double price) { m_Price = price; }
double getPrice(){ return m_Price; }
void addObject() {
object = new Object(GetPointer(this), m_Price);
Object* obj = object.whatIsYourContainer(); // object.WhatIsYourContainer returns Container and not object
Print(obj.getPrice());
}
};
Yeah! You was absolutely right :) also i have some buggy var name declarations in constructor parameters. Final code, for those who will be doing same stupid things as i do:
Works well on build 840
Thanks man!