(there's more to it than that, but we'll stop there in this post)
This line
dht11 DHT11; // [color=red]this is I think where the error is..[/color]
defines a variable of typedht11namedDHT11.
C++ is case-sensitive, and the usual convention is that we use uppercase for types. It is most likely tha the DHT-11 library follows this convention. In other words, there is no type dht11 defined anywhere: you may as well have written
FooBarBaz DHT11; // [color=red]this is I think where the error is..[/color]
And you may find if you test that line that you get the same error back. You probably actually meant
what to do if when i try to upload the code i recieve this error:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"
Sketch uses 2774 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 171 bytes (8%) of dynamic memory, leaving 1877 bytes for local variables. Maximum is 2048 bytes.
F:\arduino\hardware\tools\avr/bin/avrdude -CF:\arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\raris\AppData\Local\Temp\arduino_build_891841/sketch_apr14a.ino.hex:i
An error occurred while uploading the sketch
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "F:\arduino\hardware\tools\avr/etc/avrdude.conf"
avrdude: can't open config file "F:\arduino\hardware\tools\avr/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "F:\arduino\hardware\tools\avr/etc/avrdude.conf"
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.