programming challenge

This is a discussion on programming challenge within the C++ Programming forums, part of the General Programming Boards category; hey all, i'm new so give me a chance
Code:
int main()
{
int pass;
char login;
cout<<"hey please enter ...

Wrap from right after you ask for the login name, to the end of the cin.get with a while(1) { }, then put a break; in the if statement, and put an else statement on that if statement that cout's "wrong username".

thankyou very much, i'm still new to this hehe, by anychance does string mean you can use both int and char in the same or code or am i wrong :S

Ints hold numbers that you can perform operations on. Chars hold characters (all the keys on your keyboard basicly, something like 255), which includes A-Z, 0-9, !-), <>, [], etc. but are only for display. To hold more than 1 char in a 'char', you declare it an array, char[100], etc. and in C theres some functions you can use to make it accept "blah blah blah 29473 blah 9jblah" as a string you want to hold - its called a c-style string. Then in C++ there is a 'string', which is like a c-style string, but much easier to use. It holds characters, and numbers (but cannot perform operations like 1+1 on the numbers).

Theres a string tutorial on the site if you want to know more about strings, for C or C++. The C++ strings are fun because they are so easy to use, string3 = string1 + string2;, string1 = string1 + "additional words";, etc.