G++ - Update

Derick Centeno yellowdog-general@lists.terrasoftsolutions.com
16 Sep 2004 12:35:19 -0400


Thanks Dieter:
You wouldn't believe the references I was looking up regarding the
changes to C++!  I haven't used it in quite a while and didn't have a
hint as to what another person (who complained that g++ was broken) was
speaking of until I decided to try the current g++ in implementing C++
syntax of ...well, MANY years ago.  I figured the text used was then
printed as a Linux Programming Bible and "they" never mess with a Bible,
would they?

Sure enough....here we are. And yes, it is now clear that the compiler
was telling me exactly what you stipulated in your email, but obviously
did not communicate using the symbols you did.  Sometimes words defining
other words leading to more words become something like listening to
someone selling snake oil or magical potions for what ails you.  An
example of that was the AI fiasco of a few years back when certain
languages and AI methodologies were going to solve all our problems.
What happened?  Well, AI has become game called Psychoanalyst within
Xemacs or when the pressure is too much one can consult with the Emacs
Psychiatrist under the Help menu no less!

My old professor is not going to like the "new" C++ implementations at
all; he believes that globals of any kind are evils of the worst sort
and boy did he grade accordingly! 

Thanks for your scrupulous assistance.


On Thu, 2004-09-16 at 01:08, Dieter Vrancken wrote: 
> apply a little patch to your code:
> 
> 7c7
> <       std::int input;
> --
>  >       int input;
> 10c10
> <       cin > input;
> --
>  >       cin >> input;
> 
> Correct me if I'm wrong, but didn't the compiler tell you this already?
> 
> - Dieter
> 
> > Subject: Re: G++ - Update
> > From: Derick Centeno <aguilarojo@verizon.net>
> > To: YDL Gen <yellowdog-general@lists.terrasoftsolutions.com>
> > Date: 15 Sep 2004 16:28:58 -0400
> > Reply-To: yellowdog-general@lists.terrasoftsolutions.com
> >
> > [...]
> >
> >       1 //#include <iostream.h>
> >       2 //#include<istream>
> >       3 #include <iostream>
> >       4 using namespace std;
> >       5
> >       6 int main(void) {
> >       7         std::int input;
> >       8
> >       9         cout << "Enter a number: ";
> >      10         cin > input;
> >      11         cout << "Twice the number you supplied is " << 2 * 
> > input << endl;
> >      12         return 0;
> >      13 }
> >
> > System's response was:
> >
> > [root@arakus aguilarojo]# g++ -Wall -o numbertest numbertest.C
> > numbertest.C: In function `int main()':
> > numbertest.C:7: parse error before `int'
> > numbertest.C:10: `input' undeclared (first use this function)
> > numbertest.C:10: (Each undeclared identifier is reported only once for
> > each function it appears in.)
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'