"warning C4700: uninitialized local variable 'timeinfo' used"
change to this.
struct tm * timeinfo=NULL;
Type: Posts; User: xmariux
"warning C4700: uninitialized local variable 'timeinfo' used"
change to this.
struct tm * timeinfo=NULL;
sorry
change
void UpdateTTYInfo() {
//some code
}
oops sorry for my english definition is the right not declaration
2 ways:
compile main program and linking wiht one command, all objects will be created and an executable will be created after all
1) gcc -o myprogram example-635.c cf_packet.c
comlile...
you declare a function inside your main program!!!!
cf_packet.c must be compiled and linked with your main program.
My example works only for integers >= 0. if the input number is negative the is_digit will return -1 because of the "-".
It depencne what u want to do and what the program expect from user, u can...
in your main program to get 6 times user's input:
int res=0;
char user[100];
for(int i=1;i<=6;i++)
{
printf("for i=%d\n",i);
scanf("%s",user);
your function could be like this:
int is_digit(char* digit)
{
int len=strlen(digit);
for(int i=0;i<len;i++)
{
if(isdigit(digit[i])==false)
...
if you want to check a char printf or scan do not use %s but %c. %s is for strings(char*),pointers to char.
If you change %s to %c you check only one char.
TO check a string use char* type and...
As i understand you want to make a program which will move a file to a different location on your hard drive. I have 2 solutions:
1)you can use "system" function from stdlib.h(as i think) which...
In your first post for runs ok but your if(both) check every time the same
fileInput[SIZE][SIZE2]. To check every value of the array change to fileInput[i][j]
The values SIZE &SIZE2 are the same...
sorry man i don't have enough time but the first thing that i saw was your if statements. just change the '=' to '==' on your if's, to make them work and not changing fileInput[SIZE][SIZE2] values. 0...
check your if . must be if(something==1) and not if(something=1). The first if will check if something is equal but the second if will make something equal to 1 and then will check if something is...
try this , define student *array=NULL; array must be NULL to allocate memory with realloc
On linux there is a tool called Valgrind with valkyrie as gui which has memcheck. It saved my life!!!!I was searching faults about weeks, using this program i found more mistakes than i expected. I...
I found the problem. I tested my accept function and it returns sometimes error, this makes fork twice. One check of returned value of accept fixed my prob.
i'm stupid sorry!!!!
Thanks a lot man for your answer. I was thinking about this but i don't know how and if the signal function is called. I put a sleep function on parent for 3 secs and it prints normal things. Now...
First of all hello,i'm new to this forum!
I have a prob with the fork function(or i think that i have) and i am confused.
I have this program
void bypass_sigint(int sig_no)
{
...