In general computer science, a side effect of a routine is any change to data that is not in that routine's immediate scope.

For example, the routine "bar" in the following Pascal code has a side effect:

procedure foo;

var i: integer;

procedure bar (j: integer);

i := i + j; { side effect }

i := 0;
bar (3);
writeln (i); { also a side effect }

The C++ Standard defines a side effect as "changes in the state of the execution environment", specifically,

(1.9.7) Accessing an object designated by a volatile lvalue, modifying an object, calling a library I/O function, or calling a function that does any of the above.."