I tried a lot of different ways, but the only way is manual.
I tried with Ctrl + K and inserted the code, but it's badly rendered, and a lot of text is not inserted into the code.
Is there some solution for this?
I tried a lot of different ways, but the only way is manual.
I tried with Ctrl + K and inserted the code, but it's badly rendered, and a lot of text is not inserted into the code.
Is there some solution for this?
I am just used to
Here's an example of the result:
#include <iostream>
int main() {
std::cout << "Hello World!" << std::endl;
if(true) {
DoSomething();
}
}
You can inspect my example results above by clicking the edit button below.
I tried with ctrl-k and inserting the code, ...
Be sure to do it in the order mentioned in the above steps.
There's a maximum number of characters you can post in a single question though. Refer here to see the details please:
Anyway, at Stack Overflow (and some other sites) you should try to shape your code well, to fit within the rules of a MCVE (emphasis on minimal).
On the contrary, - at SE Code Review for example -, it is allowed to post even lengthy and complete code, but maybe better split up into a sequence of related questions, if it doesn't fit into a single question (or answer) post.
I just paste my code into a text editor, select all, double tab, copy all, and paste it into the question / answer block.