Search:

Type: Posts; User: xmariux

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    5,306

    "warning C4700: uninitialized local variable...

    "warning C4700: uninitialized local variable 'timeinfo' used"

    change to this.


    struct tm * timeinfo=NULL;
  2. sorry

    sorry
  3. Replies
    6
    Views
    1,521

    change void UpdateTTYInfo() { //some...

    change




    void UpdateTTYInfo() {
    //some code
    }
  4. Replies
    6
    Views
    13,673

    oops sorry for my english definition is the right...

    oops sorry for my english definition is the right not declaration
  5. Replies
    6
    Views
    1,521

    2 ways: compile main program and linking wiht...

    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...
  6. Replies
    6
    Views
    13,673

    you declare a function inside your main...

    you declare a function inside your main program!!!!
  7. Replies
    6
    Views
    1,521

    cf_packet.c must be compiled and linked with your...

    cf_packet.c must be compiled and linked with your main program.
  8. Thread: isdigit()

    by xmariux
    Replies
    10
    Views
    2,795

    My example works only for integers >= 0. if the...

    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...
  9. Thread: isdigit()

    by xmariux
    Replies
    10
    Views
    2,795

    in your main program to get 6 times user's input:...

    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);
  10. Thread: isdigit()

    by xmariux
    Replies
    10
    Views
    2,795

    your function could be like this: int...

    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)
    ...
  11. Thread: isdigit()

    by xmariux
    Replies
    10
    Views
    2,795

    if you want to check a char printf or scan do not...

    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...
  12. Replies
    3
    Views
    1,453

    As i understand you want to make a program which...

    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...
  13. Replies
    9
    Views
    1,385

    In your first post for runs ok but your if(both)...

    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...
  14. Replies
    9
    Views
    1,385

    sorry man i don't have enough time but the first...

    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...
  15. Replies
    9
    Views
    1,385

    check your if . must be if(something==1) and not...

    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...
  16. Replies
    27
    Views
    3,986

    try this , define student *array=NULL; array...

    try this , define student *array=NULL; array must be NULL to allocate memory with realloc
  17. Replies
    5
    Views
    1,581

    On linux there is a tool called Valgrind with...

    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...
  18. Replies
    3
    Views
    2,917

    I found the problem. I tested my accept function...

    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!!!!
  19. Replies
    3
    Views
    2,917

    Thanks a lot man for your answer. I was thinking...

    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...
  20. Replies
    3
    Views
    2,917

    fork problem!!!

    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)
    {
    ...
Results 1 to 20 of 20