warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long unsigned int *' [-Wfor
Tag : c , By : Patastroph
Date : March 29 2020, 07:55 AM
it should still fix some issue I get warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long unsigned int *' [-Wformat] for the code below unsigned long buf[254];
snprintf(systemlogmsg, sizeof(systemlogmsg), "INFO: %lu ", buf[0]); // ok
int s = 0, i;
for (i=0; i< 254; i++)
s+=snprintf(systemlogmsg+s,
sizeof(systemlogmsg)-s, "INFO: %lu ", buf[i]); // ok
|
Problem of using unsigned long long int and long long int in program to calculate power of number
Tag : c , By : Gerhard Miller
Date : March 29 2020, 07:55 AM
wish of those help I have written two functions to find power of positive and negative number in c but it is not printing anything , You're not actually calling the functions: if(number<0)
{
void Calculate_neg_power(number,expo);
}
else{
void Calculate_pos_power(number,expo);
}
if(number<0)
{
Calculate_neg_power(number,expo);
}
else{
Calculate_pos_power(number,expo);
}
int Driver(NUMBER,EXPO, ans);
|
unable to initialize array in c | warning: conversion to long unsigned from long
Tag : c , By : Mossy Breen
Date : March 29 2020, 07:55 AM
This might help you The function memset expects the third argument of the type size_t. So declare the variable N as size_t N;
fscanf(txt, "%zu", &N);
memset(dist, LONG_MAX, N*sizeof(long int));
void *memset(void *s, int c, size_t n);
|
Why isn't common_type<long, unsigned long>::type = long long?
Tag : cpp , By : Andrew Mattie
Date : March 29 2020, 07:55 AM
|
What does this scala error mean : "type mismatch; found : (((Long, Long), Long),) required: (((Long, Long), Long))
Date : March 29 2020, 07:55 AM
|