Create weight.cpp