Error On a Project I'm Working On. (Sorry If Not descriptive enough, 1st time)
-
Hi so this is my first post here, I'm having the following problem ---------------------------------------------------------------------------------------------------- 6 11 E:\Trabalhos\Programação\Projeto\Projeto.cpp [Error] expected constructor, destructor, or type conversion before '(' token ---------------------------------------------------------------------------------------------------- Here's the code:
#include
#include
#include
using namespace std;setlocale (LC_ALL, "Portuguese");
ofstream ficheiro ("Info Trabalhador");
int x, i,a,b,d;
int esc[4] = {100, 150, 200, 250};
struct trab
{
char nome[100];
char morada[200];
int numero;
int telefone;
};trab f;
int salario(int n1,int n2){
int money;
money = n1*n2;
return money;
}void menu1 (){
cout<<" * * * * * * * * * * * * * * * * * * * *"<>x;
cout<>f.nome;
cout<>f.morada;
cout<>f.numero;
cout<>f.telefone;
cout<>a;
cout<>b;
if (a == 1)
{
d=100;
cout<<"Deve Receber: "< -
Hi so this is my first post here, I'm having the following problem ---------------------------------------------------------------------------------------------------- 6 11 E:\Trabalhos\Programação\Projeto\Projeto.cpp [Error] expected constructor, destructor, or type conversion before '(' token ---------------------------------------------------------------------------------------------------- Here's the code:
#include
#include
#include
using namespace std;setlocale (LC_ALL, "Portuguese");
ofstream ficheiro ("Info Trabalhador");
int x, i,a,b,d;
int esc[4] = {100, 150, 200, 250};
struct trab
{
char nome[100];
char morada[200];
int numero;
int telefone;
};trab f;
int salario(int n1,int n2){
int money;
money = n1*n2;
return money;
}void menu1 (){
cout<<" * * * * * * * * * * * * * * * * * * * *"<>x;
cout<>f.nome;
cout<>f.morada;
cout<>f.numero;
cout<>f.telefone;
cout<>a;
cout<>b;
if (a == 1)
{
d=100;
cout<<"Deve Receber: "<