multiple .cpp files - help needed

Hello... try as i might, i can't get multiple source files and a header to work. my brain is now aching! here is my code ;)

main.cpp

#include <iostream>

#include "music.h"

using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}


music.cpp

#include <iostream>

#include "music.h"

using namespace std;

//i want to declare loads of variables here!


music.h

#ifndef MUSIC_H_INCLUDED
#define MUSIC_H_INCLUDED

//what goes here?? "declared" variables??

#endif // MUSIC_H_INCLUDED


can you throw some ideas/thoughts into my code?
i wanna link these three files together and compile them...

Thanks :)
Header files usually contain variable, class, struct, etc declarations.

With g++ ...
g++ main.cpp music.cpp -o PROGRAM_NAME 
Topic archived. No new replies allowed.