1

I am new to C# and I want somthing that works like this in C++

#define PointCloud List<PointData>

wherer PointData is a small class which contains some data about a point and List is the generic List.

Greetings

//edit: PS: Is there a name for the thing I am searching? If there is one, please tell me.

liquid.pizza
  • 505
  • 1
  • 10
  • 26

3 Answers3

3

I guess you don't mean class, instead you can use a "Using Alias Directive". The syntax for this is as follows:

using PointCloud = System.Collections.Generic.List<PointData>;
Perfect28
  • 11,089
  • 3
  • 25
  • 45
1
using PointCloud = System.Collections.Generic.List<PointData>;
pierroz
  • 7,653
  • 9
  • 48
  • 60
1

Just create a new definition for PointCloud

class PointCloud : List<PointData>
{
}

class PointData
{}
z0mbi3
  • 336
  • 4
  • 14