in C# I had the following class:
public class PixelInfo
{
public DateTime CreatedTime;
public float x;
public float y;
}
with the following code I was able to save multiple pixels:
private readonly List<PixelInfo> _pixels = new List<PixelInfo>();
foreach...
{
_pixels.Add(new PixelInfo()
{
CreatedTime = DateTime.Now,
x = xx,
y = yy,
});
}
Now I want to do the same in C++ and I tried it the following way:
std::list<PixelInfo> _pixels = {};
_pixels.push_back(new PixelInfo()
{
...
});
but this gives me an error. How can I save a List of multiple pixels using the class properties?