• Create Account

### #ActualConny14156

Posted 29 December 2012 - 04:07 AM

oh that's good to know about the public inheritance.

While am here >.< How do I know if my "compiler" is of c++11?

seeing how the foreach (well I think its foreach) that the servant of the lord showed as a example doesn't work am guessing Visual studio 2010 express is not c++11?

P.S Edit

How do I access a function(or a variable) inside a class that is inside a map that is inside a vector?

I thougth I could do it like this

Test = vEntity[0]->ComponentList[0]->getTypeName();

But I get nothing in return o.o

when I say nothing it just returned " ", what it suppose to return is TransformComponent, And I checked the value before inserting it into the component list with the debug watcher, its does indeed have "TransformComponent" but how come I cant access it?
Did I fail with my polymorph again?

std::string Test;
std::vector<std::shared_ptr<Entity>> vEntity;

vEntity.push_back(eFactory.EntityInstantiate<Entity>());
if(vEntity[0]->ComponentList.count("TransformComponent") == 1)
{
MessageBox(0,"It Works","Yay",MB_OK);
}
Test = vEntity[0]->ComponentList[0]->getTypeName();

class TransformComponent : public BaseComponent
{
private:
struct Transfromers
{
XMMATRIX Translation;
XMMATRIX LocalPosition;
XMMATRIX WorldPosition;
XMMATRIX Rotation;
XMMATRIX Scale;

};

public:

TransformComponent()
{
typeName = "TransfromComponent";
}
bool Initializing();
bool Setting();
void Update();
//void Destroy();
std::string getTypeName();
Transfromers Transform;
std::string typeName;
};



### #4Conny14156

Posted 29 December 2012 - 01:59 AM

oh that's good to know about the public inheritance.
While am here >.<
How do I know if my "compiler" is of c++11?
seeing how the foreach (well I think its foreach) that the servant of the lord showed as a example doesn't work am guessing
Visual studio 2010 express is not c++11?

### #3Conny14156

Posted 29 December 2012 - 01:59 AM

oh that's good to know about the public inheritance.
While am here >.<
How do I know if my "compiler" is of c++11?
seeing how the foreach (well I think its foreach) that the servant of the lord showed as a example doesn't work am guessing
Visual studio 2010 express is not c++11?

### #2Conny14156

Posted 29 December 2012 - 01:59 AM

oh that's good to know about the public inheritance.
While am here >.<
How do I know if my "compiler" is of c++11?
seeing how the foreach (well I think its foreach) that the servant of the lord showed as a example doesn't work am guessing
Visual studio 2010 express is not c++11?

### #1Conny14156

Posted 29 December 2012 - 01:54 AM

oh that's good to know about the public inheritance

PARTNERS