Posted to tcl by stu at Tue Jun 30 13:38:05 GMT 2015view raw

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <errno.h>
  4. int main (int argc, char *argv[]) {
  5. char *moo = "1%";
  6. char *cow;
  7. double res;
  8. res = strtod(moo, &cow);
  9. perror("");
  10. printf("res:%e\n",res);
  11. printf("moo:%p\n",cow);
  12. printf("cow:%p\n",cow);
  13. return 0;
  14. }
  15.