error: redefinition of class

You should structure your code between .h (headers) and .cpp files (implementation). You should include header files: .h Never include .cpp files. (Unless you know what you do, and that would be in really rare cases). Otherwise you’re ending compiling several times your class, and you get the error your compiler is telling you: ‘redefinition of class…’ An additional … Read more

invalid new-expression of abstract class type

invalid new-expression of abstract class type ‘box’ There is nothing unclear about the error message. Your class box has at least one member that is not implemented, which means it is abstract. You cannot instantiate an abstract class. If this is a bug, fix your box class by implementing the missing member(s). If it’s by design, derive … Read more

C ++ error: a expected initializer before [function name]

The return type for stringThing must be either void or string, not both. You also must include <string>, if you want to use string. Since you want to output the return value of stringThing() in main, I guess it should be But then, you must also return a string from your function for example. Your parameter std::string &teststring won’t work with your const char* argument. So either declare … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)