View Single Post
  #1   Spotlight this post!  
Unread 19-01-2003, 14:17
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
fcvt and itoa differences?

I posted earlier about problems using MessageBox (windows.h) with dynamic input from fcvt (string.h) and I found the problem. It seems that itoa requires the address of a character array while fcvt uses a character pointer. My question is: why? Aren't these two things theoretically the same other than a predefined amount of memory for the array?:

char *string1,string2[10];
string1="test";
string2="test";


The way I am looking at it, these should be the same. If this is the case, why does fcvt require string1 while itoa/ltoa requires string2?
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic