Q:

Yet another linker issue

I'm having a linking issue with a basic C++ program.  No, I'm not including .cpp files! 
This is what's happening. 
main.cpp:
#include "header.h"
#include <iostream>

int main() {
   std::cout << "Hello!"; 
}

header.h:
#ifndef _HEADER_H
#define _HEADER_H

class Something {
public:
   printContents();
};

#endif

something.cpp:
#include "header.h"

#include <iostream>

Something::printContents() {
    cout << "This class's Contents!!"; 
}

What's happening is that I get a compiler error going: multiple definitions of some standard C function, such as strtod:

g++     -o ... main.o
  build/....main.o: In function
  `strtod':
../MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/stdlib.h:318:
  multiple definition of `strtod'
build/..something.o:...something.cpp:(.text+0x0):
  first defined here collect2: ld
  returned 1 exit status

If I get rid of #include <iostream> in one of the two occasions and get rid of the couts, it will compile.  What's going on?  I'm using g++ and NetBeans to compile. 
I tried in the command line:
g++ *.h *.cpp -o program

and the same thing happened. 

A:

Please note that _HEADER_H is an illegal name in C++ user code - names beginning with the underscore and an uppercase letter are reserved for the C++ implementation.  This does not normally cause noticeable problems, but when you use what may be a common name in the implementation like HEADER in this context, it well might. 

A:

Modify,
Something::printContents() 
{    
  std::cout << "This class's Contents!!"; 
}

NOTE: Specify the return datatype. 

A:

One of your problems is right here:

I tried in the command line: g++ *.h
  *.cpp -o program

Don't pass your header files... Try something like this:

g++ *.cpp -o program

