Hi I just recently began learning how to program in C++ and I ran into a bit of a problem.
What I am trying to do is make the code below give me the option to put in two or more password options and for each different password I get a different response. Lets say the password is "cheesecake" like the bottom one and it says "access granted" what i want to do is give it a second option (possibly more than two) and response. For example if i just type "cheese" it would give me another text saying something like "close but no cigar" How would I go about doing something like that? Any and help is gratefully recieved ^_^
wow thanks for the speedy reply but I got an error message. I should probably let you know that I am using "Microsoft Visual C++ 2010 Express" to run stuff.
Anyway this is what I got back:
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\ostream(447): or 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(long double)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\ostream(467): or 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(const void *)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\ostream(487): or 'std::basic_ostream<_Elem,_Traits> &std::basic_ostream<_Elem,_Traits>::operator <<(std::basic_streambuf<_Elem,_Traits> *)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> while trying to match the argument list '(std::basic_ostream<_Elem,_Traits>, std::string)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========