缺少类型说明符-假定为int。注意c ++不支持default-int

问题描述 投票:1回答:1

得到此错误以及指出未声明变量“经理”,“商店”,“产品”和库存的错误,并且缺少';'在他们之前。

#include "Manager Info Structure.h"
#include "pch.h"
#include <iostream>
#include <string>
#include <fstream>
#include <array>

using namespace std;

//Vendor Variables
int VENDORSIZE = 3;
ManagerData managers[3];

结构在这里列出:

#pragma once
struct ManagerData
{
int     man_iD;
string  man_fname;
string  man_lname;
int     store_num;
int     exp_mon;
int     exp_year;
string  man_phone;
string  man_email;
};

编辑:删除了多余的信息,尝试在解决方案的顶部放置pch.h会导致在此帖子的标题中列出3个错误实例,并带有'man_fname':未知替代说明符,'man_lname':未知替代说明符,'man_phone':未知的覆盖说明符,'man_email':未知的覆盖说明符。谢谢大家到目前为止的回答

得到此错误以及指出未声明变量“经理”,“商店”,“产品”和库存的错误,并且缺少';'在它们之前。#include“经理信息...

c++ structure
1个回答
-3
投票

您很可能错过了;在定义上述结构之一之后。

© www.soinside.com 2019 - 2024. All rights reserved.