How to make a [Y/N] Source

This is a discussion on How to make a [Y/N] Source within the C++ Programming forums, part of the General Programming Boards category; I want to learn how to make on of those Where it asks you A Yes or No question and ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    14

    How to make a [Y/N] Source

    I want to learn how to make on of those

    Where it asks you A Yes or No question and you type it then it goes to something else is it possable you guys could make one.
    I love programming

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    its very possible for us to make one
    question is, can you?

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    it doesn't take too much research, but here you go:
    Code:
    int main()
    {
       char ans;
       
       cout<<"Do I know how to do this? (y/n)\n";
       cin>>ans;
    
       if(ans=='y'||ans=='Y')
          cout<<"I know how to do this!";
       else
          cout<<"Then how did I do it?";
    
       return 0;
    }
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by major_small
    it doesn't take too much research, but here you go:
    Posts like this make me want to not even bother showing up here any more. I mean seriously, what's the point in giving them everything they need? Sure, providing hints is one thing, that's what we're all here for. But just handing out the answer without any effort on their part? How does this help them? They don't learn anything, other than to expect everyone to do their work for them.

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Dec 2002
    Posts
    221
    Originally posted by quzah
    Posts like this make me want to not even bother showing up here any more. I mean seriously, what's the point in giving them everything they need? Sure, providing hints is one thing, that's what we're all here for. But just handing out the answer without any effort on their part? How does this help them? They don't learn anything, other than to expect everyone to do their work for them.

    Quzah.
    WORD to that

  6. #6
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I don't see how it could help him significantly, but it can't harm him too much either, since if he really wants to program he'll have to do most of it for himself (sooner or later)
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Source file inclusion
    By sh3rpa in forum C++ Programming
    Replies: 7
    Last Post: 10-02-2007, 12:10 PM
  2. Class methods in header or source file?
    By TriKri in forum C++ Programming
    Replies: 13
    Last Post: 09-17-2007, 06:23 AM
  3. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 04:28 AM
  4. Source code....
    By Darkcoder in forum Game Programming
    Replies: 8
    Last Post: 03-07-2005, 08:58 PM
  5. "Cannot make pipe"
    By crepincdotcom in forum C Programming
    Replies: 5
    Last Post: 08-16-2004, 01:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21