int main()
{
Mat im = imread("teste.jpg");
if (im.empty()) {
cout << "Cannot open image!" << endl;
return 1;
}
imshow("Image", im);
waitKey(0);
}
// DONT RUN...
thanks ... I could show you a picture ... using code within the code block ... the problem now when I try to use the executable outside the ide it causes this error. the application can not be properly initialized 0xc000007b. to learning alone ... help me if possible.
Please post your code. Do not just tell us you have code that gives error x. Error x tells us very little. Code and the error, as well as a good question will allow us to help you.
}
int mostra2(int ini, int fim)
{
Cadastro c;
int conta,cab,con,pav;
int cc,dd;
ifstream bd;
bd.open("internos.dat", ifstream::binary); // leitura e escrita
con=0;
cab=1;
cc=0;
pav=ini;
for (pav==ini;pav<=fim;pav++){
conta=0;
for (conta==0;conta<=reg-1;conta++){
if (cab==1){
system("cls");
cout << "LISTAGEM GERAL DE INTERNOS DO PAVILHAO " << ini << " AO " << fim << "\n\n";
cout <<"Cad\tNome (VULGO)\t\t\t\tPV/CL\tPRONT\tDT PRISAO\tSENTE\tPRESO\tPR/RE 1/6\tPR/RE 2/5";
cout << "\n=========================================================================================================================\n";
cab=0;
}
bd.seekg((conta) * sizeof(Cadastro));
int main(){
Cadastro c;
char rp[3];
int rep,per,rpe,ds,ms,as;
char dds[3],mms[3],aas[5];
char d[3],m[3],a[5];
ifstream bd;
bd.open("internos.dat", ifstream::binary); // leitura e escrita
reg=0;
setlocale(LC_ALL, "");
system("mode con cols=160 lines=50");
//system("color f0");
//system("chcp 1252 >nul");
// system("title SISTEMA DE MOVIMENTAÇÃO DE INTERNOS");
escrever(" ","branco","preto",0);
while (bd){
bd.seekg((reg) * sizeof(Cadastro));
bd.read((char *)(&c),sizeof(Cadastro)); // atualizar
reg++;
}
if (reg-1<0) reg=0; else reg--;
bd.close();
rep=8;
struct tm *data;
time_t t;
t = time(NULL);
data = localtime(&t);
ds=data->tm_mday;//dia do mes 1 a 31
sprintf(d, "%i", ds);
if (ds<10){
strcpy(dds,"0");
strcat(dds,d);
} else strcpy(dds,d);
ms=data->tm_mon+1;//mes 0 a 11
sprintf(m, "%i", ms);
if (ms<10){
strcpy(mms,"0");
strcat(mms,m);
} else strcpy(mms,m);
as=data->tm_year+1900;//ano desde 1900
sprintf(a, "%i", as);
strcpy(aas,a);
strcpy(hoje,dds);
strcat(hoje,"/");
strcat(hoje,mms);
strcat(hoje,"/");
strcat(hoje,aas);
dthj=calcData(ds,ms,as);
// do
while ((rep<1) || (rep>7))
{
system("cls");
cout << ("SISTEMA DE MOVIMENTAÇÃO DE INTERNOS\t") << "Data do SISTEMA: " << hoje <<"\tregistro: " << reg;
cout << ("\n======= == ============ == ========\t==== == ======== ==========\t================");
cout << ("\n\n1 - Registrar Internos");
cout << ("\n2 - LISTAR INTERNOS");
cout << ("\n3 - Alterar dados cadastrais do Interno");
cout << ("\n4 - INATIVAR/ativar INTERNO");
cout << ("\n5 - Consulta ESPELHO cadastral");
cout << ("\n6 - CADASTRAR Evento SETORIAL");
cout << ("\n7 - CONSULTAR Evento");
cout << ("\n\nDIGITE O NÚMERO PARA ESCOLHER UMA FUNÇÃO: ");
cin.getline(rp,2);
rep=atoi(rp);
//switch (rep){
//case 1:
//system("cls");
if (rep==1){
// strcpy(c.dataCad,hoje);
registra();
rep=8;
}
if (rep==2){
cout << "\n\n1 - LISTAGEM GERAL\t2 - CONFERE GERAL\t3 - PAVILHAO\tDigite o número: ";
cin.getline(rp,2);
rpe=atoi(rp);
if (rpe==1){
mostra();
rep=8;
} else
if (rpe==2){
mostra2(1,17);
rep=8;
} else
if (rpe==3){
cout << "\n\nPavilhão 1 ao 11 ou 12-feminino 13-arca 14-enfermaria 15-hospital 16-albergado 17-especial 99-FORAGIDO: ";
cin.getline(rp,3);
per=atoi(rp);
//per1=per;
mostra2(per,per);
rep=8;
}
}
if (rep==3){
mostra2(1,17);
altera();
rep=8;
}
if (rep==4){
inativa();
rep=8;
}
if (rep==5){
espelho();
rep=8;
}
//case 6:
if (rep==6){
//cout << ("Sistema de Movimentação de Internos\t") << "Data do SISTEMA: " << hoje <<"\tregistro: " << reg;
//cout << ("\n======= == ============ == ========\t==== == ======== ==========\t================");
cout << ("\n\nDEFININDO SETOR\n\n1 - CRC");
cout << ("\n2 - COSIS");
cout << ("\n3 - SAÚDE");
cout << ("\n4 - DEFENSORIA");
cout << ("\n5 - SEGURANCA");
cout << ("\n6 - GUARDA E DEPOSITO");
cout << ("\n7 - ADMINISTRATIVO");
cout << ("\n8 - SOCIAL");
cout << ("\n\nDIGITE NÚMERO PARA ESCOLHER: ");
cin.getline(rp,2);
rep=atoi(rp);
switch(rep)
{
case 1:
cout << ("\n\nREGISTRO E CONTROLE -- DEFINIR ÁREA ESPECÍFICA\n\n1 - AGENDAR AUDIENCIA");
cout << ("\n2 - CERTIDÃO");
cout << ("\n3 - SAÍDA TEMPORARIA");
cout << ("\n4 - MUDANCA DE REGIME");
cout << ("\n5 - CUMPRIMENTO DE ALVARÁ");
cout << ("\n\nDIGITE O NÚMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 2:
cout << ("\n\nINTEGRAÇÃO SOCIAL -- DEFINIR AREA ESPECIFICA\n\n1 - AREA LABORATIVA");
cout << ("\n2 - ÁREA EDUCACIONAL");
cout << ("\n3 - SOLICITAÇÃO DE REMISSAO");
cout << ("\n4 - SOLICITAÇÃO DE PECULIO");
cout << ("\n5 - OBSERVAÇÕES");
cout << ("\n\nDIGITE NÚMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 3:
cout << ("\n\nSAUDE -- DEFINIR AREA ESPECIFICA\n\n1 - AGENDAR ESCOLTA");
cout << ("\n2 - PERFIL BIOPSICOSSOCIAL");
cout << ("\n3 - ATENDIMENTO MEDICO");
cout << ("\n4 - ATENDIMENTO LABORATORIAL");
cout << ("\n5 - ATENDIMENTO AMBULATORIAL");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 4:
cout << ("\n\nDEFENSORIA PUBLICA -- DEFINIR AREA ESPECIFICA\n\n1 - ATENDIMENTO COM DEFENSOR");
cout << ("\n2 - PROCEDIMENTO ENCAMINHADO");
cout << ("\n3 - PENDENCIAS");
cout << ("\n4 - SOLICITACOES");
cout << ("\n5 - OBSERVAÇOES");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 5:
cout << ("\n\nSEGURANCA -- DEFINIR AREA ESPECIFICA\n\n1 - MOVIMENTACAO");
cout << ("\n2 - RESTRICOES");
cout << ("\n3 - AUDIENCIA INTERNA");
cout << ("\n4 - VISITA AUTORIZADA");
cout << ("\n5 - HORARIO ESPECIAL");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 6:
cout << ("\n\nGUARDA E DEPOSITO -- DEFINIR AREA ESPECIFICA\n\n1 - DINHEIRO");
cout << ("\n2 - EQUIPAMENTO");
cout << ("\n3 - ROUPA");
cout << ("\n4 - RESTRICOES");
cout << ("\n5 - OBSERVACOES");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 7:
cout << ("\n\nADMINISTRATIVO -- DEFINIR AREA ESPECIFICA\n\n1 - FALTA");
cout << ("\n2 - TRANSFERENCIA");
cout << ("\n3 - PUNICAO");
cout << ("\n4 - ADVERTENCIA");
cout << ("\n5 - OBSERVACOES");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
case 8:
cout << ("\n\nSETOR SOCIAL -- DEFINIR AREA ESPECIFICA\n\n1 - ATENDIMENTO");
cout << ("\n2 - VISITAS");
cout << ("\n3 - INTERVENCOES");
cout << ("\n4 - RESTRICOES");
cout << ("\n5 - OBSERVACOES");
cout << ("\n\nDIGITE NUMERO PARA ESCOLHER: ");
cin.getline(rp,2);
break;
}
rep=8;
//break;
} else rep==8;
}
}
sorry, but I'm learning alone. scratch ... from nothing ... only the internet. and may not know how to take my doubts. not want to cause hassles. without pain not the victory. and learn alone without mastering the English and without guidance is very complicated ... follow the code ... I was doing was learning as ... the Internet ... taking a ... another ... and always mentioning ... and some things that came out of my big head. thanks again ...