variable or field declared void

It for example happens in this case here: Try using std::string instead of just string (and include the <string> header). C++ Standard library classes are within the namespace std::.

Trim a string in C [duplicate]

There is no standard library function to do this, but it’s not too hard to roll your own. There is an existing question on SO about doing this that was answered with source code.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)