Problem after upgrading kevelop

Andreas Pakulat apaku at gmx.de
Thu Jan 27 22:17:22 GMT 2005


On 26.Jan 2005 - 11:51:22, Muhammad Rizwan Khan wrote:
> 
> If you don't sure then don't reply on these sort of lists.

I am absolutely sure about what I'm saying here, I don't reply to
threads where I'm unsure of the topic.

> >You've already been told how to solve it, include <iostream> instead
> > of <iostream.h> and probably you'll also need <string>
> 
> This did not work with me.

Of course, because you still did not inform yourself what proper C++
is.

> Can you try this simple program:
> #include <iostream>
> int main ()
> {
>         cout <<"test"<<endl;
> }

This is not valid C++. The standard C++ headers use the namespace std.
Have a look at /usr/include/c++/3.3/iostream.

> By running this program i got these errors:
> /root/test.cpp: In function `int main()':
> /root/test.cpp:4: `cout' undeclared (first use this function)
> /root/test.cpp:4: (Each undeclared identifier is reported only once for
> each
>    function it appears in.)
> /root/test.cpp:4: `endl' undeclared (first use this function)
 
> What these errors indicates?

That you're not using namespace std, prepend cout and endl with the
namespace or include using namespace std; before main().

> > This has nothing to do with kdevelop or kde, this is C++ basics.
> 
> If this is nothing to do with Kdevelop then why this problem arise with
> new version and with old kdevelop its running fine.

Maybe because an old kdevelop uses an old gcc which doesn't use the
new ISO/ANSI C++ library? 

Andreas

-- 
Don't you feel more like you do now than you did when you came in?

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list