Jump to content

POWERED BY:

Search the Community

Showing results for tags 'c++'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Q&A Desenvolvimento
    • Perguntas e respostas rápidas
  • Web Development
    • HTML e CSS
    • Javascript
    • PHP
    • Ruby
    • Python
    • Java
    • .NET
    • Docker, Kubernets and other environments
    • WordPress
    • Mobile
    • Agile
    • Desenvolvimento de Games
    • Banco de Dados
    • Design and UX
    • Algoritmos & Outras Tecnologias
  • Entretenimento e uso pessoal
    • Segurança & Malwares
    • Geral
    • iMasters's pub

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Google+


Hangouts


Skype


Twitter


deviantART


Github


Flickr


LinkedIn


Pinterest


Facebook


Site Pessoal


Localização


Interesses

Found 6 results

  1. Olá pessoal ! Estou tentando rodar um projeto de um jogo na minha maquina porem o mesmo pede para adicionar o log4cxx 0.10.0, realizei pesquisas na internet a respeito mas até agora nada, Encontre para baixar nesse site https://logging.apache.org/log4cxx/1.0.0/download.html porem não sei se devo instalar ele no windows porque ao exportar ele no projeto as depêndencias que precisam dele ficam informando o erro log4cxx.logger.h no such file or directory. a linguagem que estou usando e C++
  2. Sharank

    Strcat Function In C++

    Strcat Function In C++ I'm new to C and C++ programming, can anyone give me a hint on what I'm doing wrong here. I'm trying to write to concat function that takes to pointers to chars and concatenates the second to the first. The code does do that, but the problem is that it adds a bunch of junk at the end. For instance, when passing the arguments - "green" and "blue", the output will be "greenblue" plus a bunch of random characters. I also wrote the strlen function that strcat uses, which I will provide below it for reference. I'm using the online compiler at InterviewBit The exact instructions and specification is this: int main(int argc, char** argv) { const int MAX = 100; char s1[MAX]; char s2[MAX]; cout << "Enter your first string up to 99 characters. "; cin.getline(s1, sizeof(s1)); int size_s1 = strlen(s1); cout << "Length of first string is " << size_s1 << "\n"; cout << "Enter your second string up to 99 characters. "; cin.getline(s2, sizeof(s2)); int size_s2 = strlen(s2); cout << "Length of second string is " << size_s2 << "\n"; cout << " Now the first string will be concatenated with the second string "; char* a = strcat(s1,s2); for(int i = 0; i<MAX; i++) cout <<a; // system("pause"); return 0; } //strcat function to contatenate two strings char* strcat(char *__s1, const char *__s2) { int indexOfs1 = strlen(__s1); int s2L = strlen(__s2); cout <<s2L << "\n"; int indexOfs2 = 0; do{ __s1[indexOfs1] = __s2[indexOfs2]; indexOfs1++; indexOfs2++; }while(indexOfs2 < s2L); return __s1; } //Returns length of char array size_t strlen(const char *__s) { int count = 0; int i; for (i = 0; __s != '\0'; i++) count++; return (count) / sizeof(__s[0]); }
  3. #include <stdio.h> #include <stdlib.h> int arr[3][5]; int main(){ printf("Favor inserir os dados...\n"); for(int i = 0; i < 3; i++){ for(int j = 0; j < 5; j++){ scanf("%d", &arr[j]); } } printf("os valores inseridos foram...\n"); for(int i = 0; i < 3; i++){ for(int j = 0; j < 5; j++){ printf(" %d ", arr[j]); } printf("\n"); } return 0; }
  4. Danilo194

    Preciso de Ajuda - Shift-and

    Pessoal me ajudem não encontrei muita coisa sobre isso.. o exercício é o seguinte, tenho que desenvolver um programa em linguagem C, Java ou C# para a busca em texto utilizando o método SHIFT-AND. DESCRIÇÃO: O programa deverá ler um ARQUIVO TEXTO contendo o texto objeto de pesquisa com todas as letras escritas em minúsculas (texto que será pesquisado), deverá ler do teclado o texto à pesquisar (Padrão) e realizar a busca do Padrão no Texto utilizando o método SHIFT-AND. SAÍDA: O programa deverá pesquisar pelo PADRÃO no TEXTO, utilizando o método SHIFT-AND e converter em MAIÚSCULAS todas as ocorrências do PADRÃO no TEXTO, ou exibir na tela uma mensagem informando que o PADRÃO não foi encontrado no TEXTO, se este for o caso. Alguém pode me ajudar ?
  5. Bem pessoal, eu estou querendo adicionar pontos em um valor inteiro, para explicar melhor vamos ao código: char text[30]; int value = 10000000000; sprintf(text, "O valor ganho foi de: %d", value); cis->print_message(text); Eu queria saber uma forma de retornar o valor com pontos, ficando da seguinte forma: 10.000.000.000 Alguém tem alguma ideia ?
  6. jk01

    Lista encadeada C++

    Como que eu faço pra imprimir todos os elmentos da lista abaixo #include <iostream> #include<locale.h> #include<stdlib.h> #include<stdio.h> #include <ctype.h> #include<string> #include<limits> #include <string> using namespace std; template <class tipo> class No { public: tipo info; No <tipo> *prox; No(tipo elem, tipo nome, tipo descricao, No <tipo> *p); }; template <class tipo> class Lista{ private: No <tipo> *inicio; public: Lista(); ~Lista(); void insert(tipo elem,tipo nome, tipo descricao); int remove(tipo elem,tipo nome, tipo descricao); int empty(); }; template <class tipo> No <tipo> :: No(tipo elem,tipo nome, tipo descricao, No <tipo> *p){ info=elem; info= nome; info=descricao; prox=p; } template <class tipo> Lista <tipo> :: Lista() {inicio=NULL;} template <class tipo> int Lista <tipo> :: empty(){ if(!inicio) return 1; else return 0; }; template <class tipo> void Lista <tipo> :: insert(tipo elem,tipo nome, tipo descricao){ No <tipo> *ant=NULL, *atual,*novo; novo = new No <tipo>(elem,nome,descricao, NULL); if(empty()) inicio=novo; else{ atual=inicio; while(atual!=NULL && atual->info <= elem){ ant=atual; atual=atual->prox; } if(ant==NULL){//inicio novo->prox=inicio; inicio=novo; } else{//meio ou fim ant->prox=novo; novo->prox=atual; } } } template <class tipo> Lista <tipo> :: ~Lista(){ No <tipo> *p; while(inicio!=NULL){ p=inicio; inicio=inicio->prox; delete p; } } int Menu() { int opcao,idEspecialidade; char op='2'; int retorno; string nomeEspecialidade, descricaoEspecialidade; setlocale(LC_ALL, "Portuguese"); cout<<"-----------------------------"<<endl; cout<<"- CLÍNICA MOREHEALTH -"<<endl; cout<<"-----------------------------"<<endl; cout<<"[1]-CADASTRAR ESPECIALIDADE"<<endl; cout<<"[2]-SOLICITAR CONSULTA"<<endl; cout<<"[3]-LISTAR CONSULTAS"<<endl; cout<<"[4]-SAIR"<<endl; cout<<"-------------------------------"<<endl; cout<<"INSIRA A OPÇÃO DESEJADA (1 A 4): "; cin>> opcao; cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); do { switch(opcao) { case 1: { cout<<"Informe id Especialidade :"; cin>>idEspecialidade; cin.ignore(); cout<<"Informe Nome Especialidade: "; getline(cin,nomeEspecialidade); cout<<"Informe descrição Especialidade: "; getline(cin,descricaoEspecialidade); system("pause"); system("cls"); return Menu(); break; } case 2: { system("pause"); system("cls"); return Menu(); return Menu(); break; } case 3: { system("cls"); cout<<"nenhuma lista "<<"\n"; system("pause"); system("cls"); return Menu(); break; } case 4: { system("cls"); cout<<endl; cout<<":::::::::::::::::::::"<<endl; cout<<"*SISTEMA FINALIZADO*"<<endl; cout<<":::::::::::::::::::::"<<endl; exit(0); break; } } cout<<endl; cout<<"****opção inválida,tente novamente!***"<<endl; cout<<endl; cout<<"INSIRA A OPÇÃO DESEJADA (1 A 4): "; cin>> opcao; cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); } while(opcao>0 || opcao<5); system("cls"); } //programa principal int main() { Menu( ); Lista <string> L; return 0; }
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.