I am trying to pass a reference to struct based vector but keep getting an error "C2923:'std::vector' : 'InstalledApps' is invalid as template argument '#1', type expected"
See my attempt below, What is the best way to accomplish this task?
Thanks,
JD..
Code:
#include "stdafx.h"
#include "windows.h"
#include <vector>
#include <string>
using namespace std;
struct InstalledApps {
string Vendor;
string PartNumber;
string Status;
};
int main(void)
{
vector<ProductList> ProdList;
GetProdlist(ProdList);
}
//external file
using namespace std;
extern InstalledApps;
void GetProdList(vector<ProductList>& ProdList);
GetProdList(vector<ProductList>& ProdList)
{
Do something here
};