Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Standard C, C++

Reply
 
LinkBack Thread Tools Display Modes
Old 08-27-2003, 12:56 PM   #16 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,161
Belisarius is on a distinguished road
Post

Sorry about the numerous posts, I'm just replying to various points

Anyways, it didn't look like anyone explained the problem. The \n is actually a carraige return (IE "Enter"). That keystroke, as I understand what joe_bruin is saying, gets passed along with the 'y', so you need to account for it.

Quote:
Originally posted by ntws01
I have no idea where you got that from, ther user does not at any point enter '\n' in fact there is no '\n' I used a forward slash because I knew that a backslash would be an escape charater. The user inputs either y or n but never '\n'.
As for the spelling mistake thats a minor problem.

BTW. I have had this problem before a number of times with GCC without a using 'cin << varname;' and that is why I'm think the problem might be the compiler itself
__________________
GitS
Belisarius is offline   Reply With Quote
Old 08-27-2003, 01:03 PM   #17 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
Quote:
Originally posted by Belisarius
I think sde IS abuse. So no worries.
=) yes, i am abuse. no problems, everything is handled in this thread.
__________________
Mike
sde is offline   Reply With Quote
Old 08-27-2003, 01:08 PM   #18 (permalink)
ntws01
Registered User
 
ntws01's Avatar
 
Join Date: Mar 2003
Location: Canada
Posts: 15
ntws01 is on a distinguished road
Send a message via Yahoo to ntws01
Quote:
Originally posted by Belisarius
Sorry about the numerous posts, I'm just replying to various points

Anyways, it didn't look like anyone explained the problem. The \n is actually a carraige return (IE "Enter"). That keystroke, as I understand what joe_bruin is saying, gets passed along with the 'y', so you need to account for it.
Oh I think I understand that now.
I'm only getting one char, but the '\n' is automatically appended to the end of the users input because the user has to press enter to submit the value.
ntws01 is offline   Reply With Quote
Old 08-27-2003, 01:24 PM   #19 (permalink)
ntws01
Registered User
 
ntws01's Avatar
 
Join Date: Mar 2003
Location: Canada
Posts: 15
ntws01 is on a distinguished road
Send a message via Yahoo to ntws01
Quote:
Originally posted by ntws01
Oh I think I understand that now.
I'm only getting one char, but the '\n' is automatically appended to the end of the users input because the user has to press enter to submit the value.
Tried it and it works, thanks for the help everyone.

BTW. If joe_bruin doesn't already know can you tell him that I regret what I said earlier and that it was a mistake on my part to get angry at him.
ntws01 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do Multidimensional arrays work like a hash in Perl? philthee Java 1 10-22-2004 01:06 PM
ASP.NET: Day / Work Week / Week / Month web calendar control with view like MS Outloo gicio MS Technologies ( ASP, VB, C#, .NET ) 0 12-10-2003 10:05 AM
San Diego Tech. work. Admin Lounge 10 02-03-2003 06:19 PM
Getting X to work in Debian w00t Linux / BSD / OS X 7 08-25-2002 01:44 PM


All times are GMT -8. The time now is 10:40 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting