Ir para conteúdo
Fórum Script Brasil

Mizumoto

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que Mizumoto postou

  1. Bom dia, Estou aprendendo C++ utilizando uma apostila que baixei do apostilando.com. Em um dos exercícios, por algum motivo, o compilador não está entendendo o que é "string" Segue o programa... // AloStr.cpp // Ilustra o uso // do tipo string. #include <iostream.h> int main() { // Declara e inicializa // uma variável do // tipo string. string aloTar = "Alo, Tarcisio!"; // Exibe a string. cout << aloTar; } // Fim de main() Ao compilar, a seguinte mensagem de erro é exibida: bash-3.2$ gcc AloStr.cpp In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31, from AloStr.cpp:4: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. AloStr.cpp: In function 'int main()': AloStr.cpp:10: error: 'string' was not declared in this scope AloStr.cpp:10: error: expected `;' before 'aloTar' AloStr.cpp:12: error: 'aloTar' was not declared in this scope Alguém sabe me dizer como eu faço isso aí funcionar? Obrigado,
×
×
  • Criar Novo...