|
From: Per W. <pw...@ia...> - 2003-09-20 13:47:02
|
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 p=
rograms that was provided. When I compile and run it I get errors.
> Please help.
> =A0
> // 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 no=
w 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 UNSUBSC=
RIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|