The sketch needs to have a certain defined structure. it expects a function called setup() that is run once and loop() that is called repeatedly. Look at some examples.
You are in the process to create a file that holds a Class " dht". It is like a library and most of the time that is included with a constructor. Look also at other examples where that is done as well as how the Class is to be defined (you are missing parts).