X-Originating-IP: [24.169.88.178] From: "Timothy M Boronczyk" To: djgpp AT delorie DOT com Subject: help with strings Date: Fri, 27 Sep 2002 22:35:06 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 28 Sep 2002 02:35:07.0312 (UTC) FILETIME=[A8841B00:01C26697] Reply-To: djgpp AT delorie DOT com I've been making tremoendous strides with help from the cprogramming.com tutorial (it may not be trustworthy, but it gives me an idea), Thinking in C++, and everyone here. I've not only figured out cin and cout, but I've also successfully implemented do/while and for loops, switch/case and if statements, and creating functions and passing, modifying, and correctly returning variables. Now, my project calls for me to implement strings. But I'm left scratching my head between the tutorials and fidling around; what I think should work either errors out during compilation, or gets stuck in an endless loop. I've tried: char string_var[20]; cin.getline(string_var, 20, '\n'); I've even tried: char string_var[20]; int count=0; do { cin>>char[count]; count++; } while ((count<20)!!(string_var[count-1]=='\n')) As always, any help would be greatly appreciated. -Tim _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com