- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
4 Posted Topics
Re: I use Codelite, Anjuta and sometimes Geany, combined with g++. OS: Linux Mint. | |
Re: In convert_int_to_string you're declaring an array of 5 strings, but at the end of the function you're returning the 6th-string in the array, which doesn't exist. Remember that index starts at 0. | |
Re: Why don't you store the player guess directly from input? [CODE] string strPlayerGuess; cout << "Your number: "; getline( cin, strPlayerGuess); [/CODE] And then compare both strings in a for loop [CODE] string Response; for( int i = 0; i < strPlayerGuess.length(); i++ ) { if( strPlayerGuess[i] == strComputerGeneratedNumber[i] ) … | |
Re: Try this: [CODE]derived::derived(int a) : base(a) { cout << "derived int " << a << "\n"; } [/CODE] More info [URL="http://www.learncpp.com/cpp-tutorial/114-constructors-and-initialization-of-derived-classes/"]here[/URL] |
The End.