Ir ao conteúdo

Nayuugga

Membro Pleno
  • Posts

    92
  • Cadastrado em

  • Última visita

  1. Há algumas maneiras de se fazer isso: Você pode usar void* como parâmetro: struct lista { Lista* Proxima; void* Valor; }; Lista* inserir(void* valor) { //Código de inserção } Ou usar Templates. Exemplos: http://www.cplusplus.com/doc/oldtutorial/templates/
  2. #include <stdio.h> #include <stdlib.h> int main() { int valor = 0; int unidade = 0; int dezena = 0; int centena = 0; printf("Informe o valor: "); scanf("%d", &valor); unidade = valor % 10; dezena = (valor / 10) % 10; centena = (valor / 100) % 10; if (centena % 2 == 0) printf("PAR\n"); else printf("IMPAR\n"); system("PAUSE"); return 0; }
  3. Você quer que mostre conforme digita ou dado uma string mostrar na tela devagar letra por letra?
  4. i<j não i <=j
  5. using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Printing; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; using Microsoft.Reporting.WinForms; //.... public static void Imprimir(LocalReport report,string nomeImpressora) { string deviceInfo = "<DeviceInfo>" + " <OutputFormat>EMF</OutputFormat>" + " <PageWidth>210mm</PageWidth>" + " <PageHeight>297mm</PageHeight>" + " <MarginTop>0mm</MarginTop>" + " <MarginLeft>0mm</MarginLeft>" + " <MarginRight>0mm</MarginRight>" + " <MarginBottom>0mm</MarginBottom>" + "</DeviceInfo>"; Warning[] warnings; report.Render("Image", deviceInfo, CreateStream, out warnings); foreach (Stream stream in m_streams) stream.Position = 0; Print(nomeImpressora); if (m_streams != null) { foreach (Stream stream in m_streams) stream.Close(); m_streams = null; } } PrintDialog tela = new PrintDialog(); string nomeImpressora = ""; if (tela.ShowDialog() != DialogResult.OK) return; nomeImpressora = tela.PrinterSettings.PrinterName; LocalReport relatorio = new LocalReport(); relatorio.ReportEmbeddedResource = "relatorio.rdlc"; Imprimir(relatorio, nomeImpressora);
  6. Nayuugga

    c#

    Space Port
  7. Nayuugga

    Cor da letra em C++

    O comando system("color XX") muda o cor do console e não de uma string específica. Tente dar uma estudada na biblioteca graphics.h
  8. Nayuugga

    Help -me

    #include<iostream>int main(){ int i=0,num[10],menor =0,n =1; while(n != 0){ std::cin>>num[i];// if (i == 0)// menor = num[i];//Esse código deve ser inserido. if(num[i] == 0){ n =0; } if(num[i] < menor){//Deveria ser else if aqui num[i] = menor; //Deveria ser (menor = num[i] aqui. } i +=1; } std::cout<<menor;}. Sua lógica contém alguns erros, mas é uma boa lógica. Tente refazê-la de novo ou use a solução apresentada pela Isis Binder.
  9. Nayuugga

    Erro no codigo.

    int* EliminarRepetidos(int* vetor, int tamanhoVetor, int* novoTamanhoVetor) { int* novoVetor = NULL; int id = -1; for (int i = tamanhoVetor; i >= 0; i--) { for (int j = i - 1; j >= 0; j--) { if (vetor == vetor[j]) { for (int w = i + 1; w < tamanhoVetor; w++) vetor = vetor[w]; tamanhoVetor--; } } } novoVetor = (int*)malloc(sizeof(int) * tamanhoVetor); for (int i = 0; i < tamanhoVetor; i++) novoVetor = vetor; *novoTamanhoVetor = tamanhoVetor; return novoVetor; }
  10. while(fgetc(arquivo) != EOF) contador++;

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...