Thread: What does the following syntax mean (function declared inside a function)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    7

    What does the following syntax mean (function declared inside a function)

    Code:
    char ** parse(char *line) {
    	char	*newstr();
    	.
    	.
    	.
    	.
    }
    
    char *newstr(char *s, int l) {
    	.
    	.
    }
    newstr is declared inside the function parse.

    In the list of function prototypes in the beginning of the file, newstr is the only one undeclared.

    What does it mean? Does it act like a function prototype? What's the advantage? How come newstr declared inside parse does not contain any parameters?

    [Edit]
    Might as well link where I found the source code
    http://wps.prenhall.com/wps/media/ob...de/ch09/smsh.h
    http://wps.prenhall.com/wps/media/ob...09/splitline.c
    Last edited by vyn; 04-10-2009 at 10:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM