OK, solved by adding function:
int first_digit( int num )
{
while(num >= 10) {
num = ( num - ( num % 10 ) ) / 10;
}
return num;
}
Type: Posts; User: cecylia
OK, solved by adding function:
int first_digit( int num )
{
while(num >= 10) {
num = ( num - ( num % 10 ) ) / 10;
}
return num;
}
I need to validate a number entered by a user in a textbox using c. The user should not be able to enter 0 as the first digit like 09521 etc.., wherein he should be allowed to enter 90254 etc...
Hello
I want to prevent to type zero as the first digit in value in c code
char next_buffer[ 5 ];
int frame_counter;
int digit_counter;
How to make this warning clean
typedef struct Recording_Settings recording_settings;
struct Recording_Settings
{
gchar *profile;
gchar *destination;
};
recording_settings...
typedef struct list_info_s list_info_t;
struct list_info_s
{
int position;
char name[ 50 ];
list_info_t *next;
list_info_t *prev;
};
I have nothing to do with the "how to optimize "for" statement" post. If so considered, can close my post.
Hello, I want to make menu with 10 line size and scroll text line by line in menu from a list with text.
For this I wrote same command as:
menu_set_text /* set text a line position in menu */...