home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19749 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  773 b 

  1. Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!despair
  2. From: despair@netcom.com (Scott Hanson)
  3. Newsgroups: comp.os.vms
  4. Subject: C pointer question
  5. Message-ID: <1992Dec23.002554.19604@netcom.com>
  6. Date: 23 Dec 92 00:25:54 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  8. Lines: 19
  9.  
  10. I am porting some C code to the VAX, and am having many problems.  One
  11. of them was fixed by DEC Support (after a lot of feeling around) by changing
  12. this:
  13. void foo(char a[])
  14. {
  15. bar(a);
  16. }
  17.  
  18. to this:
  19. void foo(char a[])
  20. {
  21. bar(&a);
  22. }
  23.  
  24. bar wants a char *, foo is passed a char *.  What am I doing wrong?
  25. What is VMS C doing to my previously working code?  Any suggestions?
  26. -- 
  27. Scott Hanson        This has been a recording.
  28. despair@netcom.com
  29.