CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #2
    Join Date
    Mar 2009
    Location
    Granada, Spain
    Posts
    40

    Re: returning a char as a pointer

    Try this:

    Code:
    void position (char, char *);
    
    
    int main (void);
    {
         char orientation;
         char *orien;
         position(orientation, orien);
    
         printf("Orientation is: %c", *orien);
    
         
         fflush(stdin);
         getc(stdin);
         return 0;
    
    }
    
    
    void position (char orientation, char *orien)
    {
         scanf("Selection is: %c", &orientation);
         *orien = orientation;
    }
    Last edited by Tronfi; May 24th, 2009 at 06:08 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured