CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: greenie__

Search: Search took 0.02 seconds.

  1. Replies
    13
    Views
    1,255

    Re: accessing class properties with string

    I know it may seem like i'm trying to shoehorn c++ to do javascript(as speedo put it). I usually would just make classes as normal. This isn't my first c++ app, though what I do is just fiddle. ...
  2. Replies
    13
    Views
    1,255

    Re: accessing class properties with string

    Peter_APIIT
    I know test.x works in c++
    It sounds like I had not made it clear enough. That I wanted to access property x using a string.

    JohnW@Wessex
    I am not really sure how to use std::map...
  3. Re: How on earth to have a mixed type list/vector??

    jgrady there is something you have to keep in mind. It is the way you are addressing this forum. Which has resulted in this bad situation.
    It is not because you mentioned java. People would have...
  4. Replies
    13
    Views
    1,255

    accessing class properties with string

    I was wondering if there is a way to access a property of a class using a string.

    In javascript you can do this.
    test.x=0
    which is the same as
    test["x"]=0
    and
    var n="x";
    test[n]=0
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured