c - error: expected expression before ',' token -


#include <stdio.h> #include <stdlib.h> #include <ctype.h>      struct nodes     {         char* info;         struct nodes * left;         struct nodes * right;      };      char* question = "any question?";     struct nodes * node = null;     struct nodes * nodeleft = null;     struct nodes * noderight = null;      struct nodes newnode (char info[50], struct nodes * l, struct nodes * r)        `       {         struct nodes conf;         conf.info = info;         conf.left = l;         conf.right = r;         return conf;     } 

here im trying create new root node null left , right nodes

    int main(){         node = newnode (question, nodoleft*, nodoright*);          return 0;     } 

dont know why i'm getting error while im trying create new node... i'm new in c error: error: expected expression before ',' token

in "nodoleft*," , "nodoright*" looks though have started multiplication, , left off without second operand. in case, each parameter should expression. in context, variable names qualify expressions. so, if have

node = newnode (question, nodeleft, noderight); 

your compiler happier.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -