Can't fix these...

I'm new here and I just want your suggestions guys on how to fix this. I got this 2 erros: error:new types may not be defined in a return type
note: (perhaps a semicolon is missing after the definition of 'stocks')
error: two or more data types in declaration of 'main'

i hope you guys can help me with these!

#include <iostream>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>


using namespace std;

class stocks

{
public:
void management_one();
void management_two();

private:

int pick, new_code, edit_code, random_number, number_item, item_one, answer ;
string new_item;
string edit_name;
string name_costumer;
string code_order;
double code_price;
double code_amount;
double code_quantity;
}



int main()
{

int choice;

cout << " BUSINESS MANAGMENT "<<endl;
cout << " \n<1>INVENTORY \n<2>ORDER "<<endl;
cout << " \nPICK A COMMAND: ";
cin >> choice;

switch (choice)
{
case 1:
{

management_one.stocks();

break;
}

case 2:
{
management_two.stocks();

break;
}



Last edited on
You have missed the ending bracket } for the main function.

Missing semicolon ; at the end of the class definition.

What are you trying to do here? management_one.stocks();
You probably want to create a stocks object somewhere.
stocks my_stocks;
Then you can call management_one on that object like this
my_stocks.management_one();
Last edited on
@Peter87 - is this correct?..



int choice;
stocks my_stocks;

cout << " BUSINESS MANAGMENT "<<endl;
cout << " \n<1>INVENTORY \n<2>ORDER "<<endl;
cout << " \nPICK A COMMAND: ";
cin >> choice;

switch (choice)
{
case 1:
{

my_stocks.management_one();

break;
}

case 2:
{
my_stocks.management_two();

break;
}


void management_one()

{
cout << "\nWELCOME TO THE INVENTORY MANAGEMENT "<<endl;

cout << " \nWHAT DO YOU WANT TO DO? :" <<endl;
cout << " \n<1> ADD \n<2> EDIT \n<3> View" <<endl;
cout << " \nPICK A COMMAND: ";
cin >> pick;

switch (pick)
{
Topic archived. No new replies allowed.