Forum: C++ Aug 14th, 2009 |
| Replies: 9 Views: 487 I doubt whether this will help..:S , your read_in file remains intact, your read_out now is:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string word;
//... |
Forum: C++ Jul 20th, 2009 |
| Replies: 10 Views: 540 Then..
I wouldn't agree.
A snippet which might help you if you can see the link.:twisted:
#include<iostream>
#include<string> |
Forum: C++ Jul 19th, 2009 |
| Replies: 10 Views: 540 Another approach could be
1.Make another userGuess string.
2. First , fill all the characters in userGuess string
with underscores( _ ).
3.Make changes in the userGuess string.
guess();... |
Forum: C++ Jul 18th, 2009 |
| Replies: 11 Views: 810 //Get lowest
lowest = scores[0];
//Without the for loop code works fine.
//for ( int count = 1; count < numScores; count++)
//{
//if(scores[numScores] < lowest)
// Out of bounds
//array... |
Forum: C++ Jun 30th, 2009 |
| Replies: 18 Views: 751 cin would stop reading as soon as it encounters a space !
Use getline instead:
getline (cin , passage)
Instead , |
Forum: C++ Mar 30th, 2009 |
| Replies: 4 Views: 642 that is because int the function
void printForm(char form[][6], int row, char column)
you get into the block only once
if(i == row - 1 && j == static_cast<int>(column)-65)
You don't make... |
Forum: C++ Mar 4th, 2009 |
| Replies: 18 Views: 684 This would certainly work if all the numbers are distinct,else you 'll get only the last occurrence of that number in the 'loc' |
Forum: C++ Jan 13th, 2009 |
| Replies: 9 Views: 494 Refer http://www.daniweb.com/tutorials/tutorial71858.html |
Forum: C++ Jan 13th, 2009 |
| Replies: 9 Views: 494 Ok,this is the else part of your loop
When you use a cin statement ,the cin stops reading the buffer after it encounters a white space or a newline.So when you read something like this:
"Civics... |