Is the formatting always like that? What I mean here is...
>>> <INPUT TYPE=HIDDEN NAME=cdate VALUE="6400">
... is cdate always followed by a space, then the string VALUE=", then the number, then another double quote? There are ways to do it anyway, but if the format is absolutely fixed, then we don't need to modify the earlier code that much to make it work, simply use strstr() to look for "cdate VALUE=\"" instead of just "VALUE=\"" - if you see what I mean.
If the format varies, there are ways around it but it gets more fiddly.
Code:
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
int main()
{
char String[] = "<INPUT TYPE=HIDDEN NAME=cdate VALUE=\"6400\">";
char ValueBuf[10];
char *p;
int i = 0;
int Value;
p = strstr(String, "cdate VALUE=\"");
p += 13;
while (*p != '"')
{
ValueBuf[i] = *p;
++i;
++p;
}
Value = atoi(ValueBuf);
printf("Value is : %d\n", Value);
return 1;
}