MS has a habit of replacing standard C functions with "safe" versions, scanf_s is one such implementation. The docs are here: http://msdn.microsoft.com/en-us/library/w40768et.aspx
I believe the error will go away if you make this change:
scanf_s("%s %s", firstName, _countof(firstName), lastName, _countof(lastName));
I also believe there's a way to get around their corruptions of the language, but I stopped using MSVC years ago for precisely this reason.