[ create a new paste ] login | about

Link: http://codepad.org/JFqS70yI    [ raw code | output | fork ]

C++, pasted on May 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
int main()
{
char* filename = (char*)"file21.txt";

int theNumber = 0;

sscanf(filename, "file%d.txt", &theNumber);


printf("your number is %d", theNumber);


}


Output:
1
your number is 21


Create a new paste based on this one


Comments: