Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - allmatters

Pages: [1]
1
Graphics / Re: Core dump with 2D array with RectangleShape type
« on: July 05, 2024, 08:13:56 am »
That did it. Thank you so much!

2
Graphics / [SOLVED]Core dump with 2D array with RectangleShape type
« on: July 04, 2024, 05:10:52 pm »
Hello friends, I'm pretty new to C++.
Sorry for the lack of context because I really don't know what causes it to segfault.
Basic data types work, but sf::RectangleShape doesn't? Why is that?

        std::array<std::vector<sf::RectangleShape>,3> bricks {{ {},{},{} }};
        for (int x {0};x<bricks.size();x++)
        {
                bricks[x].reserve(4);
                for (int y {0}; y<bricks[x].capacity();y++)
                {
                        bricks[x][y].setSize(sf::Vector2f(160.f,40.f));
                }
        }
 

Pages: [1]
anything