Originally Posted By: JustSid
Sometimes I wish this forum was like Stack Overflow just so that I can upvote Uhrwerks comments and give him the reputation he deserves frown

Wow. Thank you. crazy smile I guess I'll print that and read it whenever I need motivation.

Originally Posted By: Yashas
Could you give me an simple example of code becaz when ever I try I can't get it right.

Code:
#include <acknex.h>
#include <windows.h>

STRING* ini_file = "";

void main()
{
	str_cpy(ini_file,work_dir);
	str_cat(ini_file,"\\test.ini");
	if (WritePrivateProfileString("MySection","MyKey","MyValue",ini_file->chars))
		printf("That was an easy one.");
	else
		error("Oh dear, something went wrong!");
}


The only pitfall here is that you need to have the necessary privileges to write to the directory where you create the ini file. Note that depending on your operating system you don't have these rights for every folder.


Always learn from history, to be sure you make the same mistakes again...