Message-ID: <001b01c03860$e5469d40$2813ddcc@default> From: "Josh Haglund" To: Subject: Programming Date: Tue, 17 Oct 2000 12:37:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Reply-To: djgpp AT delorie DOT com Hello everyone! I'm need some help writing some code. I have this chess program... and I want to write a simple configuration file or .ini file for it. For example... if it looked something like this. ------------------------------ st 10 sd 6 ------------------------------ Now "st" stands for set time and "sd" stands for set depth. I want my chess program to open or read the .ini file and change the default settings. I don't know how to _write it_. Could someone give me some help? Here's a peice of it's code. if (!strcmp(s, "st")) { scanf("%d", &max_time); max_time *= 100000000; max_depth = 10000; continue; } if (!strcmp(s, "sd")) { scanf("%d", &max_depth); max_time = 1000000000; continue; } Thanks for your time, Josh Haglund lhaglund AT wiktel DOT com P.S. I can compile in Dev C++, I still have to try with djgpp. :)