Created
December 5, 2017 00:16
-
-
Save anderson-marin26/b1564a6856eb96a3071f48eeb84e4af0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Declarações do programa Ponto de Venda | |
#include<iostream> | |
#include<Windows.h> | |
using namespace std; | |
//definições do programa | |
#define PAUSA system("pause") | |
#define LIMPAR_TELA system("cls") | |
#define ATIVO 'A' | |
#define INATIVO 'I' | |
#define EXTENSAO_DESCRICAO 40 | |
#define EXTENSAO_RAZAO 40 | |
//caminho dos arquivos | |
#define CAMINHO_CONFIG "..\\Mercado.ini" | |
#define CAMINHO_CADASTRO "..\\Produtos.cad" | |
//opções do menu | |
#define CADASTRAR_PRODUTO 'C' | |
#define EXCLUIR_PRODUTO 'E' | |
#define MOSTRAR_PRODUTO 'N' | |
#define VENDER_PRODUTO 'V' | |
#define SAIR_DO_PROGRAMA 'S' | |
//struct de data | |
typedef struct tagDATA | |
{ | |
int nDia, nMes, nAno; | |
}DATA; | |
//struct da configuração | |
typedef struct tagCONFIgURACAO | |
{ | |
int nQtdeProdutos; //qtde de produtos no estoque | |
char cRazaoSocial[EXTENSAO_RAZAO + 1]; //razão social do mercado | |
DATA stDtInicio; //data do inicio | |
}CONFIGURACAO; //configuração | |
//struct do cadastro do produto | |
typedef struct tagPRODUtO | |
{ | |
int nCodProduto; //código 1, 2, 3, ..., nQtdeProdutos | |
char cAtivo, //ativo ou inativo | |
cDescricao[EXTENSAO_DESCRICAO + 1]; //descrição do produto | |
double dPrecoUnit; //preço unitario | |
}PRODUTO; | |
//protótipos das funções do programa | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment