From: mirat can bayrak (mcbayrak@anadolu.edu.tr)
Date: Mon 16 Jul 2007 - 17:02:16 EEST
þöyle bir var elimde
<code>
#include <string>
#include <iostream>
using namespace std;
bool IsNumeric(string const &szInput)
{
for(int i = 0; i < szInput.length(); ++i)
if(szInput[i] < 48 || szInput[i] > 57)
return false;
return true;
}
int main(int iArgc, char **ppchArgv)
{
cout << "Ornek uygulama" << endl;
cout << ppchArgv[1] << endl;
return 0;
}
</code>
dosyayý 1.cpp olarak kaydediyorum
gcc ile derlediðim zaman þu hatalarý veriyor.
horselogy@mirat-pardus denemeler $ gcc 2.cpp
2.cpp: In function `int main(int, char**)':
2.cpp:17: error: invalid initialization of reference of type 'const
std::string&' from expression of type 'char**'
2.cpp:6: error: in passing argument 1 of `bool IsNumeric(const std::string&)'
2.cpp:24:2: warning: no newline at end of file
nedendir?
_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama