2 Replies - 7531 Views - Last Post: 05 May 2006 - 07:17 AM Rate Topic: -----

#1 duygugvn  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 31-October 05

atoi() and strtok() - What do they do?

Post icon  Posted 04 May 2006 - 03:06 PM

1)

column=atoi(temp)

what does it mean???in our lessons I didnot C this type atoi???
is it related to C or C++??
how can I say these term in different way!!!

2)

strtok???
can I USE different things??
this is cut the words like: "sponge bob"
sponge
bob

can anybody answer questions ;)

Is This A Good Question/Topic? 0
  • +

Replies To: atoi() and strtok() - What do they do?

#2 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 205
  • View blog
  • Posts: 4,807
  • Joined: 23-December 05

Re: atoi() and strtok() - What do they do?

Posted 04 May 2006 - 03:30 PM

1) column is an integer variable, as the function atoi has the type declaration of:
int atoi(char* string);

this function gives the integer value of the input string.

2) has a type definition of:
char* strtok ( const char* string, const char* delimiters );

which basically searches the string for the supplied delimiter(s)
and returns a char pointer to the first occurance of this delimeter

This post has been edited by William_Wilson: 04 May 2006 - 03:31 PM

Was This Post Helpful? 0
  • +
  • -

#3 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: atoi() and strtok() - What do they do?

Posted 05 May 2006 - 07:17 AM

duygugvn, on 5 May, 2006 - 02:28 AM, said:

1)

column=atoi(temp)

what does it mean???in our lessons I didnot C this type atoi???
is it related to C or C++??
how can I say these term in different way!!!

It existed when C was developed so you can say it's related to C.

But C++ is a superset of C, so all functions of C become a part of C++ as well.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1