I have the following piece of code in which I try to call the function runapplication in order to execute notepad.exe.
The error it gives me is: D:\computing\c\resource\sysinfo\main.cpp|24|error: cannot convert 'std::string {aka std::basic_string<char>}' to 'LPCSTR {aka const char*}' in assignment|
On the left is a parameter of type LPCSTR, which is an alias of const char*.
On the right, a string.
A string is not the same thing a const char*. You have givebn the compiler a string object, and told it to assign that value (that string) to a const char*. The compiler has no idea how to do this.
You could probably fix it by changing line 19 to this: