Mail Archives: djgpp/1994/01/27/01:51:54
---------- 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 -