#include <iostream>
#include <conio.h>
using namespace std;
//structure declaration;
struct shares
{
string CompanyName;
int Number_of_shares;
double Unit_price_of_shares;
};
//function prototype;
void enterCompanyName (shares shares[]);
void printshares (shares shars[]);
const int sizeOfArray = 50;
int main()
{
shares shares[sizeOfArray];
int amount = i //You will need to ask the user how many they want to
//input the shares;
for (int i = 0; i < 0; i++)
{
cin >> shares[i].Number_of_shares; // number of shares or unit price
}
//Display totalshares
cout << "The shares entered are: \n"
<< printshares;
_getch();
return 0;
}
//Functions
//Prints out the array of company
void printshares(shares shares[])
{
for(int i = 0; i < i; i++)
{
cout << shares[i].Unit_price_of_shares;
}
cout << endl;
}
this is my code and l am getting an error code c2065 and c2143, can someone tell me what is wrong with the building
This post has been edited by Salem_c: 05 October 2012 - 09:05 PM
Reason for edit:: added [code][/code] tags - learn to use them yourself

New Topic/Question
Reply



MultiQuote




|