When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
4 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Welcome to Together C & C++. We have many channels on various topics, and encourage you to explore the channel list. Please ask your question in the appropriate channel:
Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.
State your problem clearly and provide all necessary details:
Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:
Well-formatted code is much easier to read, especially for people who haven't written it themselves. Poor formatting can even be misleading, especially indentation:
while (is_waiting); // BAD! reader may think that
std::cout << "hi\n"; // printing is in the loop
while (is_waiting) { } // good, empty statement
std::cout << "hi\n"; // is clearly visible
For C and C++, you can use clang-format to decide on a style, and apply it automatically to your files. You can use it in the terminal, or through an editor plugin.
Most IDEs will also let you configure a style in their settings, but clang-format is universal.