From: Korhan GURLER (korhan.gurler@pro-g.com.tr)
Date: Mon 16 Jul 2007 - 17:30:47 EEST
Ayni kodu mu derliyorsunuz?
Daha onceki kodunuzda IsInt diye bir sey goremedim de.
On Mon, 2007-07-16 at 17:14 +0300, mirat can bayrak wrote:
> dediðiniz gibi denedim fakat sonuç deðiþmedi
> <code>
> horselogy@mirat-pardus denemeler $ g++ 1.cpp -o 1
> 1.cpp: In function `bool IsInt(const char*)':
> 1.cpp:4: error: `strlen' was not declared in this scope
> 1.cpp:16:2: warning: no newline at end of file
> </code>
>
> On Monday 16 July 2007 17:15:10 Korhan GURLER wrote:
> > g++ 1.cpp -o 1
> >
> > diye derlerseniz sorununuz kalmaz
> >
> > Iyi calismalar
> >
> > On Mon, 2007-07-16 at 17:02 +0300, mirat can bayrak wrote:
> > > þö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
>
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
-- Korhan GURLER, Sistem ve Guvenlik Uzmani Pro-G Bilisim Guvenligi ve Arastirma Ltd. Sti. Tel: +90 312 473 35 12 Web: http://www.pro-g.com.tr ****** Guvenliginiz Geleceginizdir ******_______________________________________________ Linux-programlama mailing list Linux-programlama@liste.linux.org.tr http://liste.linux.org.tr/mailman/listinfo/linux-programlama