Invalid conversion from 'int' to 'const char*' while reading SD card

https://en.cppreference.com/w/cpp/language/lambda

answers the request of a client(WebServer...)

Hello i need to read write a string to a sd card but everything i tried does not work...

What exactly have you tried? There are many examples that come with the SD library. Posting the code you tried, along with any errors would be helpful.

If you do post your code, please read the sticky post at the top of the forum to learn how to do it properly with code tags. It helps people help you.

Finally, there is a difference between a 'String' and a 'string' so which is it? Your title and text do not match.

shouldn't cross post

@bs_tuejj Topics merged

Why did you start a second one ?

i think it's ironic that someone would use a lamda function and not understand String vs c-string.

also ironic that the lamda function was duplicated ?? (why not inline)?

Stroustrup said developers shouldn't use features unnecessarily

Im new to the forum and i thougt the topic of this post wasnt on point of the problem any more...

Not intractable, see Taming Arduino Strings for the solutions.

The libraries being used here are already using Strings all over the place. There's no reason here to copy them to char arrays manually.

The use case here is an argument to a function that takes a function pointer. What would the syntax be for doing that "inline"?

Per above, I think either a lambda for a named function would be necessary.

Why pick a lambda? In the case I'll bet OP, like most newbies, simply copied what was in the examples.