This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libstdc++/9149: Error on 'itoa' function, feature missing.


>Number:         9149
>Category:       libstdc++
>Synopsis:       Error on 'itoa' function, feature missing.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 02 20:26:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tom G.
>Release:        gcc version 2.95.4 20011002 (Debian prerelease)
>Organization:
>Environment:
GNU/Debian Linux Sarge/Testing
Kernel 2.4.18-bf2.4
>Description:
the feature of 'itoa' which converts integers to strings is missing from the stdlib.h file.
>How-To-Repeat:
#include <stdio.h>
#include <stdlib.h>

int main ()
{
  int i;
  char buffer [33];
  printf ("Enter a number: ");
  scanf ("%d",&i);
  itoa (i,buffer,10);
  printf ("decimal: %s\n",buffer);
  itoa (i,buffer,16);
  printf ("hexadecimal: %s\n",buffer);
  itoa (i,buffer,2);
  printf ("binary: %s\n",buffer);
  return 0;
}
>Fix:
Input the itoa function in the stdlib.h include file.
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]