Ok, so I have seen this error all over this forum and other forums and have tried and double checked all my code but I still get this error.
I have commented out the entire main() function with no difference to the compiler error, so I would assume that it is not the cause. Also, the main() function does not throw any compilation errors.
There are 3 files below: main.cpp, hash.h, and hash.cpp.
g++ -Wall -c main.cpp
main.cpp:9:1: error: unterminated comment
In file included from main.cpp:6:
hash.h:9: error: expected unqualified-id before char
hash.h:9: error: expected ) before char
make: *** [main.o] Error 1
#ifndef hash
#define hash
#include <iostream>
#include <string>
usingnamespace std;
int hash/*<--- This is a macro that resolves to nothing*/(char *v, int M);
#endif