Thread: pls help proof read

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    1

    pls help proof read

    pls help me proof read for c prog. syntax errors. this is a basic c progam for synchonization between two computers on a parrallel virtual machine network.(hence all that pvm blah blah). Also i need corrections.

    Code:
    main()
    {
       int cc, tid, msgtag;
       char buf[100];
    
       printf("i'm t%x\n", pvm_mytid());
    
       cc = pvm_spawn("hello_other", (char**)0, 0, "", 1, &tid);
    
       if (cc == 1) {
            msgtag = 1;
          pvm_recv(tid, msgtag);
          pvm_upkstr(buf);
          printf("from t%x: %s\n", tid, buf);
       } else
          printf("can't start hello_other\n");
    
       pvm_exit();
    }
    these also:
    Code:
    #include "pvm3.h"
    
    main()
    {
       int ptid, msgtag;
       char buf[100];
    
       ptid = pvm_parent();
    
       strcpy(buf, "hello, world from ");
       gethostname(buf + strlen(buf), 64);
        msgtag = 1;
       pvm_initsend(PvmDataDefault);
       pvm_pkstr(buf);
       pvm_send(ptid, msgtag);
    
       pvm_exit();
    }
    Last edited by Ken Fitlike; 08-17-2006 at 04:55 AM. Reason: added code tags

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. read only folder on Windows
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-05-2007, 09:18 AM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. I am lost on how to read from file and output to file?
    By vicvic2477 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2005, 11:52 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Help! Can't read decimal number
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 09-07-2001, 02:09 AM