Answer to Question #30817 in C++ for Jack
Define an array of 15 CStock elements.
#include <iostream>
#include <string>
using namespace std;
class CStock
{
public:
CStock(void);
CStock(string c_symbol; string c_company, double c_price);
~CStock(void);
double getPrice();
void setPrice(double c_price);
friend istream& operator >> (istream& input, CStock& C);
friend ostream& operator << (ostream& output, CStock& C);
string symbol;
string company;
private:
double price;
};
1
2013-05-21T10:09:08-0400
#include <iostream>
#include <string>
using namespace std;
class CStock
{
public:
CStock(void);
CStock(string& c_symbol; string c_company, double c_price);
~CStock(void);
double getPrice();
void setPrice(double c_price);
friend istream& operator >> (istream& input, CStock& C);
friend ostream& operator << (ostream& output, CStock& C);
string symbol;
string company;
private:
double price;
};
Int main () {
//define array
CStock& array[15];
//end of the program
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment