Thread: return error

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    36

    return error

    i have the following codes in C language in linux:
    the problem with me is that when i call readFile function...it checks for some if statement and calls notexist function ......after the notexist function completes its operation it does not return to readFile function and print "back here"....can anyone suggest my mistake


    int main(int argc, char *argv[]) {
    ....
    ....
    ....
    if (strcmp(msg,lm)==0)
    {
    readFile(w);
    }
    }
    return 0;
    }


    notexist(char *me)
    {
    ....
    ....
    ....
    return(1) ;
    }

    void readFile(char *file)
    {
    ....
    ....
    ....
    if ( )
    {
    notexist(file);
    printf("back here");
    }

    return;
    }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Not a chance - you've edited your code so that it no longer compiles (nor does it have code tags)

  3. #3
    Registered User
    Join Date
    Aug 2004
    Posts
    36

    return

    the reason i edited my code is that my code uses socket programming and i am stuck in the part that my messages are not refreshed each time i send them so i wanted to use function and return statements

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  4. using c++ in c code
    By hannibar in forum C Programming
    Replies: 17
    Last Post: 10-28-2005, 09:09 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM