   Few basic questions about UML (C++)
  Hello.I have started to learn UML.I want to ask you how to put on scheme few things that are in my C++ code (I will be glad if some of you would answer to part of them, I have put them together not to make to many similar topics):1. The pointerI want to signalize that the attribute of my class is a pointer (I want to be compatible with new UML standard). As far as I know I can do it by that:I don't know if it's a good notation.And how to draw it in the class 'box', just like other attributes?I don't think writing '*' like this will be ok with standards:2. The structure declared in another structure/class.The example c++ code:struct class1{   struct class2{ int value;   };   class2 structures2;};For now I have made sth like this from the first image, but it not contains additional information that class2 was declared inside class1 and cannot be used anywhere else.Btw, is there any difference when I will change classes with structures in that example?3. Can I use both methods: put attribute in the class 'box' and draw the second class 'box' and connect that two boxes?I'm thinking of sth like that:For that code:class class2;class class1{   class2 * Attribute1;};
  1) Usually, C++ pointers are supposed to correspond to UML associations between classes, not UML class attributes. Is it an optional association?2) Do you really care to express in your diagram that class2 is only visible within class1?If it is really private, class2 is an implementation detail of class1 that doesn't belong in the same class diagrams as class1; on the other hand class2 can appear in a diagram of class1's internals without peculiar notations. 3)I cannot see the pictures ATM.Quote:Btw, is there any difference when I will change classes with structures in that example?As you should know, C++'s struct and class keywords are identical except for default visibility of members; both correspond directly to UML classes.   