Thread: Question on passing array arguments to function, and not printing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    What do you want this line
    Code:
    t->fname[90]=*array;
    to do? I would think that it would set the ninetieth character of fname to whatever the value of the char pointer passed in was, cast to a character. If you want to copy a string, you should use strcpy.

  2. #2
    POeT GuY Matus's Avatar
    Join Date
    Feb 2008
    Location
    Bz
    Posts
    235
    Quote Originally Posted by tabstop View Post
    What do you want this line
    Code:
    t->fname[90]=*array;
    to do? I would think that it would set the ninetieth character of fname to whatever the value of the char pointer passed in was, cast to a character. If you want to copy a string, you should use strcpy.
    Yea thanks Tabstop, case closed, i overlooked that assignment, wasnt thinking there, Matt solved the prob! Yea and u are right too, strcpy to copy too, that ota work too

    Cheers thanks!
    Last edited by Matus; 11-21-2008 at 11:45 AM.
    PoEms R InsPiRatiOns of LIfE ExpErienCes!!


Popular pages Recent additions subscribe to a feed