Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
strtoll: converts the string into a long long and returns the result
//Header file: #include <stdlib.h>
//Declaration: long long int strtoll(const char * restrict start, char ** restrict end, int radix);
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
int main(void)
{
char *end, *start = "100.00 AAA 200.00 BBBB";
end = start;
while(*start) {
printf("%f, ", strtoll (start, &end));
printf("Remainder: %s\n" ,end);
start = end;
while(!isdigit(*start) && *start)
start++;
}
return 0;
}