[C++] What is wrong with my constructor?
Hello,
I am having a problem with a basic C++. I have searched around, but i only found reasons pretty different from what my code is. I have also reduced it to a minimal code that reproduces the error. The gcc error message is: Code:
t.cpp:15:5: error: expected unqualified-id before ‘{’ token https://images2.imgbox.com/3a/59/WhjTFCbD_o.png Help the image service: https://imgbox.com/WhjTFCbD Want to read and copy here? Fine. file t.cpp is: Code:
#include <iostream> Code:
#ifndef tH Unrelated question: why i do not have gcc manual page, having Debian gcc installed?? I checked files installed with its package, and it has other man pages, but not of "gcc" itself. Years ago it had! |
The "()" in a constructor definition is not optional. So it should be:
Code:
Agent() |
LOL... how did i miss that?? I even looked a book teaching C++, compared with my program, and nothing...
|
All times are GMT -5. The time now is 11:15 PM. |