Create weights.cpp