I hope this helps . I tried to search the answer to this error on the internet, but the problem always seems to be that someone forgot to add the return specifier int to the main function. It's weird, because the error is thrown on a line where nothing can possibly be wrong: , You forgot to place
it fixes the issue I'm trying to make a function that takes a templated type and adds it to the end of the list/array and I'm running into an error that I can't seem to find a way around. I'm new to templates so I'm not sure if it's a problem with how I'm using templates or something else.
hope this fix your issue It seems the compiler doesn't know what MenuButton is. One reason this may be the case is that MENUBUTTON_H is also defined by another header. More likely, something like Globals.h also included "title.h", i.e., you have a dependency loop in your system. If you know about classes being cyclically dependent, you are best off removing the cycles. There are many ways to do that. Even if you currently think you need the cyclic dependency, it is not good and probably not required (the book "Large Scale C++ Design" by John Lakos contains a lot of information on how to break dependency cycles). If you don't know where the cycle is coming from, I recommend using the -E (or /E) flag with your compiler: This option normally yields the translation unit after it got preprocessed. It will contain indications on which file was entered in some form. How the preprocessed output looks like depends on the compiler but you'll be able to see what the compiler gets to see and you can probably track down why MenuButton isn't declared.
error C4430: AND error C2143: syntax error : missing ';' before '*'