I don't think that's it - see he wrote #include <iostream.h> not <iostream>
therefore the namespace issue doesn;t apply.
What are the errors?
>From: Per Westermark <pw...@ia...>
>To: Steve Sherman <she...@ho...>
>CC: dev...@li...
>Subject: Re: [Dev-C++] Student problem
>Date: Sat, 20 Sep 2003 15:46:27 +0200 (CEST)
>
>In the new standard, everything is in the namespace std, so:
>
>std:cin >> ...
>std::cout << ...
>std::string mystring;
>
>/Per W
>
>On Sat, 20 Sep 2003, Steve Sherman wrote:
>
> > I am a student learning basic programming and this is one of the sample
>programs that was provided. When I compile and run it I get errors.
> > Please help.
> >
> > // city.cpp
> > #include <iostream.h>
> > #include "apstring.h"
> > int main()
> > {
> > apstring city_name;
> > unsigned long population;
> > cout << "What is the name of your city or town? ";
> > getline(cin, city_name);
> > cout << "What is the population of the city or town? ";
> > cin >> population;
> > cin.ignore(80,'\n');
> > return 0;
> > }
> >
> >
>__________________________________________________________________________________________________________________________________________________
> > Instant message with integrated webcam using MSN Messenger 6.0. Try it
>now FREE -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven.
>http://thinkgeek.com/sf _______________________________________________
> > Dev-cpp-users mailing list Dev...@li... TO
>UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
|