sed add line after match

C++
sed '/^anothervalue=.*/a after=me' test.txt
Source

Also in C++: