Rather strange. No Robert or Barbara found on Army marriages in Capetown, but did find:-
Anderson, James. Capetown, 1895, page 249
and
McPherson, Blanche. Capetown, 1895, page 249
These may or may not have married one another, only the certiface will confirm.
Also, on Ancestry's Military service records I found :-
Anderson, James, born about 1874, joined up 23/11/1892, Yorkshire Regt. Completed 21 years including service in Gibralter, South Africa and India.
Father Alexander, brothers, Robert (10), Alexander (7) and William (7)
Sisters Jane, Rose [A], Bella, Margaret.
Address 45 North Road, [Torres], Invermess.
This may be an irrelevant co-incidence, but it is interesting.
Good luck, Eric-C