New answers tagged

0 votes

Modify a string by identifying a substring, and replace it and the characters following it with a newly computed substring

Create a function that does the replacing It is good practice to create a function for what you are doing. A function will have a name that describes what it is doing, and it clearly defines the input ...
user avatar
  • 32.1k
2 votes
Accepted

Connect Four in C++

Avoid macros whenever possible As marcinj already mentioned in the comments, you can replace the macro at() with a regular function. Macros are problematic in many ...
user avatar
  • 32.1k

Top 50 recent answers are included