我最近从Visual Studio 2015升级到Visual Studio 2017.当我打开我在2015年编写的程序时,系统和tolower被标记为未定义,我无法获取要编译的代码。
#include <iostream>
#include <cstdlib>
#include <cctype>
#include <vector>
#include <iomanip>
using namespace std;
#include "CashRegister.h"
#include "Inventory.h"
#include "CustomerDB.h"
#include "Customer.h"
#include "Report.h"
#include "InventoryBook.h"
const string INVENTORY_FILENAME = "inventory.dat";
void cashRegisterMenu(CashRegister& cr, Inventory& inv);
void customerMenu(CustomerDB& cdb);
void inventoryMenu(Inventory& inv);
void reportMenu(Report& rep, Inventory& inv, CustomerDB& cdb);
void displayBookInfo(const InventoryBook* book);
void displayCustomerInfo(Customer customer);
InventoryBook makeBook();
InventoryBook editBook(const InventoryBook* book);
Customer makeCustomer();
int main()
{
char choice;
//float cost;
CashRegister cr;
Inventory inv(INVENTORY_FILENAME);
Report rep;
CustomerDB cdb;
do
{
system("CLS"); // UNDEFINED
cout << "Welcome to the Serendipity Booksellers POS Software System"
<< endl << endl;
cout << "Options:" << endl << endl;
cout << "R - Cash Register" << endl;
cout << "I - Inventory" << endl;
cout << "C - Customer" << endl;
cout << "H - Report" << endl;
cout << "Q - Quit Program" << endl << endl;
cout << "Enter option: ";
choice = tolower(cin.get()); // UNDEFINED
我最终创建了一个新项目并将所有文件移动到新项目中。当我这样做时,一切都在新项目中起作用,但所有代码都完全相同。我真的不想为2017年之前在某个版本的VS中编写的每个程序都这样做。任何人都对可能发生的事情以及如何在不创建新项目并复制文件结束?