expected unqualified-id before string constant

后端 未结 3 1097
傲寒
傲寒 2021-02-05 03:20

I\'m currently writing a C++ application which implements an Oscillator in conjuction with math.h. The code I have should work fine for the application (trying to compile an obj

3条回答
  •  渐次进展
    2021-02-05 03:32

    Your code has multiple problems:

    • You need to fully qualify names(void oscillators::print_table() instead of just void print_table()) in oscillators.cpp
    • You probably need to #include "oscillators.h" into oscillators.cpp
    • You need to properly declare variables in implementation
    • Add missing semicolons.

    But I guess that specific error is caused by missing semicolon after class definition in header file. Just add it like:

        std::vector gtable_; // Will contain a wavetable with a guard point.
    };
    #endif
    

提交回复
热议问题