Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #37.0K
Ranked #4K
~1K People Reached
Favorite Tags
c++ x 4

4 Posted Topics

Member Avatar for sergent

I use Codelite, Anjuta and sometimes Geany, combined with g++. OS: Linux Mint.

Member Avatar for hystaspes
0
331
Member Avatar for Zvjezdan23

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.

Member Avatar for thines01
0
123
Member Avatar for Zvjezdan23

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] ) …

Member Avatar for Zvjezdan23
0
546
Member Avatar for VernonDozier

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]

Member Avatar for VernonDozier
0
118

The End.