SDL_ttf vector rendering

I’m new in SDL and not sure if there is an specific function for the following:
Working with Xcod c++
I’m doing a graph with x and y axes.
I figured out the grid, position and all the points in the graph but cannot solve the column value. The row value to show in the screen.

As the row are user defined I don’t know them until runtime. So I stored the values in a vector and tried to render it with a loop.
So, in the main loop I have the following function.

text(r, ret.c_str(), font, &rect1);
r is the renderer;
ret is the variable that change each iteration
rect1 also change in each iteration

and when it render, it only shows the last one.

I see the other number in the screen when I move the cursor over it, so they are rendering but disappearing at each loop.

Thanks for you help

hi your message is a bit confusing. Try to be more precise

Hi and welcome to the forum!

Can you maybe show us an image describing the result you’re trying to achieve?

An image says more than 1000 words, especially when it’s something that might be hard to explain in words.