[prog] Re: more C++

Kathryn Andersen kat_lists at katspace.com
Sun Dec 14 18:46:51 EST 2003


On Sat, Dec 13, 2003 at 06:14:39PM -0500, wolf wrote:
> how in C++ programming could you make your answer print with a space 
> between each character or number?
> 
> Say either to print
> 
> A B C
> 
> or
> 
> 1 2 3
> 
> or is this never done or not allowable?

You have to explicitly print the spaces.  Every single one.
Like, for example,

cout << integer1;
cout << " ";

-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe


More information about the Programming mailing list