egrep -R -H -n -C1 --include=*.c --include=*.h 'searchstring'
If the search string contains spaces you need to use \s+ between the terms.
If the search string contains regex special characters they have to be escaped.
For example to search for "char *actual" the full search string becomes:
egrep -R -H -n -C1 --include=*.c --include=*.h 'char\s+\*actual'
Options:
-R to recurse
-H to show the file names
-n to show the line numbers
-C1 to show one line either side of the found line for context