Thread: First post: few basic questions:

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    3

    First post: few basic questions:

    Hello, I would just like to introduce myself to the board. My name is nick, i'm a computer networking student at a local tech college here in minnesota and i'm just starting to learn c++. I registered to this board in the hopes that i can find some good, quality help and guidance throughout my c++ prgramming class and beyond.

    So here are a few of my questions:

    attached is a text document with my code - if someone has time to run it, you can see the problems.

    If you run the program, enter the proper username and password - the program will still do the while loop until it loops 3 times - this is undesirable!

    second, after going through the while loop, even with the correct pw, it still continues then outputs the "your aren't a user" thing.

    how can i fix this??

    umm, i'm hope someone understodd that!



    anyway, if nothing, else, i'm sayin' hi!

    thanks for the help,
    Last edited by 1Fly4i; 05-02-2002 at 10:28 AM.

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    3
    heres the file...

    my bad!

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    95
    You could use a break statemnt to exit the loop upon succesfully entering the correct login. Or simply set your count to 5 when a succesful login occures increment c in the else portion of your if then.

    Your exiting the while loop with a goto statment I don't think that is a good idea.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    3
    sounds good. Thanks for the help. exiting the while loop with a goto is exactly wrong - i have since change that!

    thanks,

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions about arrays basic collision detection
    By The_Hermit in forum Game Programming
    Replies: 2
    Last Post: 07-23-2008, 11:29 AM
  2. Two basic questions about generated assembly
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 07-16-2008, 03:19 AM
  3. basic questions about web services development
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 07-13-2008, 09:30 AM
  4. Some basic C questions
    By WarDoGG in forum C Programming
    Replies: 5
    Last Post: 07-12-2008, 10:40 AM
  5. stdlib.g/system() <- basic questions.
    By sean in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 06-11-2002, 07:31 AM