Jan 30, 2013 at 6:14am UTC
Hi everyone, I had error when i run my program. My program is like
in my source program
my error is like
two or more data types in declaration of 'main'.. Why? If you know it, pls kindly share me. Thanks.
Last edited on
Jan 30, 2013 at 6:56am UTC
Jan 30, 2013 at 6:30am UTC
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. class LinuxCamera
Jan 30, 2013 at 6:59am UTC
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?
Jan 30, 2013 at 7:15am UTC
You just forgot semicolon after
Jan 30, 2013 at 7:36am UTC
if i put semicolon behind it, i got error like "aggregate"main()::LinuxCamera cam" has incomplete type and cannot be defined.
Jan 30, 2013 at 7:57am UTC
Show content of LinuxCamera.h