S
syntax
hi i have a simple question.
question1
-----------
i have a string
char string[20] = "114 145";
i simply want to extract two integers from it i.e i want 114 and 145
..
how can i do it??
i write in C
question2
-----------
suppose i have a file like below
file
----
$123 124$ 125 146 $145 164$ 12 3 4 ....like this
i want to read from the file such a way that whenever i found a
starting "$" and a ending "$" , the content in between i want to store
in a string.
that is, in this example my string will be
char str1[10] ="123 124"
and
char str2[10]="145 164"
how do i read from the file...can you tell me the syntax.
other data i want to read as integers.
thanks
question1
-----------
i have a string
char string[20] = "114 145";
i simply want to extract two integers from it i.e i want 114 and 145
..
how can i do it??
i write in C
question2
-----------
suppose i have a file like below
file
----
$123 124$ 125 146 $145 164$ 12 3 4 ....like this
i want to read from the file such a way that whenever i found a
starting "$" and a ending "$" , the content in between i want to store
in a string.
that is, in this example my string will be
char str1[10] ="123 124"
and
char str2[10]="145 164"
how do i read from the file...can you tell me the syntax.
other data i want to read as integers.
thanks