delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/27/01:51:54

From: <salehh AT csos DOT orst DOT edu> (Hassan Saleh)
Subject: form syntax ... (fwd)
Organization: Kaleida Labs, Inc.
Originator: daemon AT talisman DOT kaleida DOT com
Date: 27 Jan 94 03:48:53 GMT
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Reply-To: djgpp AT sun DOT soe DOT clarkson DOT edu


---------- Forwarded message ----------
Date: Thu, 20 Jan 1994 18:17:34 -0800 (PST)
From: Hassan Saleh <salehh AT CSOS DOT ORST DOT EDU>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: form syntax ...

Please can someone point out to me what is wrong with the following 
program segment ? It won't compile with djgpp.


==========================================================
#include "iostream.h"
#include "string.h"

main()
{
int index;
float distance;

   index = -23;
   distance = 12.345;

   cout << "The value of distance is " << form("%12.4f\n",distance);
   cout << form("Hello world!") << "\n";

   cout << "Input a decimal value --> ";
   cin  >> index;
   cout << "The hex value of the input is " << index << "\n";
}






- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019