I am struggeling now for days, because I'm very new to c++.
I want to write something into a .ini file with WritePrivateProfileString
int i = 0;
char arr[total];
stringstream ssin(configs);
while (ssin.good() && i < total){
ssin >> arr[i];
++i;
};
[...]
WritePrivateProfileString(TEXT("Config"),TEXT("active"),arr[i],path);
(total is a int that equals 6 and configs is a string like "text1 text2 text3")
And now I want to seperate every text (text1, text2, text3)
in to a array so I can u easily use them.
But because WritePrivateProfileString
uses LPCSTR I cant insert this char array as input.
[Error] invalid conversion from 'char' to 'LPCSTR {aka const char*}' [-fpermissive]
Is there a way to use the char array in the WritePrivateProfileString
function or how can I convert it so it can be used in this function?
Thank you in advance.