Bonjour,
pourriez vous m'indiquer visual c++ ne me compile pas ca alors que dev
c++ le fait tres bien. J'ai bien créé un projet en faisant cela :
New project>>win32console application>>empty project et j'ai inclus le fichier qui contient ce code.
l'erreur générée est la suivante :
:\esgi\exos c++\projet_bdd\bdd.cpp(26) : error C2679: binary
'<<' : no operator defined which takes a right-hand operand of
type 'class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >' (or
there is no acceptable co
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
string str="";
int i=0,j=0,taille_str=0;
while (i<argc)
{
for (j=0;j<strlen(argv[i]);j++)
{str+=argv[i][j];taille_str++;}
i++;
}
cout<<str;
system("pause");
return 0;
}
Merci d'avance.