1

Getting this error along with an error stating that the variables "managers", "stores" "products", and inventory" are undeclared and there are missing ';' before them.

#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];

the structure is listed here:

#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;
};

edit: removed superfluous information, attempting the put pch.h at the top of the solution results in 3 instances of the error listed in the title of this post along with 'man_fname': unknown override specifier, 'man_lname': unknown override specifier, 'man_phone': unknown override specifier, 'man_email': unknown override specifier. Thank you everyone for your answers so far

  • 4
    Does this answer your question? [What is "pch.h" and why is it needed to be included as the first header file?](https://stackoverflow.com/questions/54121917/what-is-pch-h-and-why-is-it-needed-to-be-included-as-the-first-header-file) – walnut Nov 28 '19 at 04:41
  • How about narrowing down the problem keeping only on header and then showing us all that remains? Example: Since the issue is coming for 3 types : "manager" "products" and "inventory" i assume its the same issue with all of them. Why don't you remove headers belonging to e.g. products and inventory keeping the header only for manager, and in your cpp just jeep `ManagerData managers[3];`. – anurag86 Nov 28 '19 at 04:43
  • the code shared is not sufficient to find the root cause for the issue. there might be some code in header files (which are not shared) that can cause the issue. – Abhishek Chandel Nov 28 '19 at 05:21

1 Answers1

-3

You are most probably missing a ; after definition of one of the mentioned structs.

Saisai3396
  • 311
  • 1
  • 8