Error: conversion from `PriceFeed*' to non-scalar type `PriceFeed' requested

  • Thread starter Thread starter axed
  • Start date Start date
  • Tags Tags
    Error Type
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 5K views
axed
Messages
2
Reaction score
0
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;

class PriceFeed
{
public:
PriceFeed(vector<string>& tickers)
{
// init(tickers);
}
}
int main ()
{
vector<string> tickers;
tickers.push_back("AAPL");
tickers.push_back("XOM");

//PriceFeed(tickers);
PriceFeed pf = new PriceFeed(tickers); // Error on this line
system("pause");
//return 0;
}

Can you please tell me where am i going wrong. This is the error
conversion from `PriceFeed*' to non-scalar type `PriceFeed' requested
 
Physics news on Phys.org