Here is my code. I seem to be doing something wrong and am getting multiple compilation errors but feel that it has got something to do with one thing alone. Kindly help.
-
There isn't sufficient code or explanation to respond. Can you be more specific? Also, please add more code and paste in examples of the compiler errors.– Cliff BCommented Jul 3, 2017 at 18:43
-
Actually I'm just trying to create a node with two parameters. One bool and another an array. Root is supposed to be the head.– Archit CheckerCommented Jul 3, 2017 at 18:47
1 Answer
The problem is that you are trying to make assignments that are dependent on runtime values outside of main or any other function. This is not allowed. Global vars can be declared outside of main, and certain elementary assignments like assigning constants like NULL or constants. The thing these all have in common is that these actions are all things that can be done at compile time, not run time.
The assignments that the code is trying to do must be done inside of main or inside of a function.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)