#include <stdlib.h>#include <stdio.h>#include <iostream.h>
int main(void){int n;char *str = "124512.67";n = atoi(str);cout <<"string=";printf("%d",n);cout << " integer =";printf("%d",n);return 0;}
[此贴子已经被作者于2007-6-22 21:26:40编辑过]