Question about class functions

I am just trying to compile the class: clockType straight from a book and for some reason I keep getting two errors at line 13....the first error says: ISO forbids declaration of clockType with no type and the second error says: expected ',' or "..." before '&' token. And if I take away line 13, I get one error telling me: undefined reference to 'SDL_main'. Does anyone know what is happening? Thanks for any response?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
using namespace std;

class clocktype
{
    public:
            void setTime(int, int, int);
            void getTime(int&, int&, int&) const;
            void printTime() const;
            void incrementSeconds();
            void incrementMinutes();
            void incrementHours();
            bool equalTime(const clockType&) const;

    private:
            int hr;
            int min;
            int sec;
};/*play with the class name after I run the program..i.e.: put the variable here instead
of having it in main and see what it does: the class name is clockType*/



clocktype is not the same as clockType
Silly me! So the first two errors disappeared but I keep getting: undefined reference to 'SDL_main'
This means you're trying to use SDL_main but you have not provided it. You have not told the linker which library to link against.
Alright. I used int main() and the problem disappeared. Thanks!
Topic archived. No new replies allowed.