your class LinuxCamera should be in your header LinuxCamera.h, not in your main function. The error is because you said LinuxCamera is a class, but you declared it as a function header. If you want to have it in the main function, then put the full declaration of the class in main.
even though, If i put class LinuxCamera line inside main, it still got errors like expected initializer before 'cam'.
another error is 'cam' was not declared in this scope. How to solve it?