CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: taymaxi

Search: Search took 0.02 seconds.

  1. Replies
    9
    Views
    2,528

    Re: Searching file for string

    I'm not sure what I was messing up, but I finally got it to work with this:


    #include<iostream>
    #include<fstream>
    #include<string>
    #include<iomanip>
    #include<algorithm>
    using namespace std;
  2. Replies
    9
    Views
    2,528

    Re: Searching file for string

    Oh, okay, I realized my issue is that I was entering a two word phrase and it was only searching for the first word. How can I get it to accept the space character and search for phrases as well? I...
  3. Replies
    9
    Views
    2,528

    Re: Searching file for string

    I used this, but it still prints the entire file, not just the line where the text is found
  4. Replies
    9
    Views
    2,528

    Re: Searching file for string

    Okay...I looked up what npos is and I'm not totally sure how to use it. Sorry if this is really basic, but we haven't covered that yet and I'm having a hard time understanding how exactly to use it.
  5. Replies
    9
    Views
    2,528

    Searching file for string

    I'm in a beginner C++ course, and have gotten stuck on an assignment I've been given. This is the part I'm having trouble with right now:

    The program then asks the user for a search string, which...
  6. Replies
    5
    Views
    6,369

    Re: Overriding the prefix/postfix operators

    Ahh, thank you! I actually saw a line in the instructions that specified this, and made the change myself along with a few other things, but didn't realize this was what made the difference. Thanks,...
  7. Replies
    5
    Views
    6,369

    Re: Overriding the prefix/postfix operators

    Okay...to be honest, I'm not really sure what most of that means. Based on what you said, I made some changes so now the class definition reads:


    #include<string>
    #include<iostream>
    using...
  8. Replies
    5
    Views
    6,369

    Overriding the prefix/postfix operators

    I have an assignment which includes overriding the prefix and postfix operators, and my teacher has provided what the output from the program should be. I've written the code and it's nearly...
  9. Replies
    3
    Views
    1,957

    Re: Game of Life program

    Okay. Thanks.

    That error in my code was a mistype which somehow didn't register when I was looking it over. I understand that it's supposed to compare to next[r][c], not next[ROWS][COLUMNS]. As...
  10. Replies
    3
    Views
    1,957

    Game of Life program

    Hi, I'm fairly new to programming and have been given this assignment:


    My teacher gave us the main function and the function called neighbors, but we need to write the other functions listed in...
  11. Re: Error: no operator "==" matches these operands

    This is a homework assignment, I'm supposed to be writing the code myself. I'm fairly new to all this. How do I overload the == operator for PhoneEntry?
  12. Error: no operator "==" matches these operands

    I'm trying to do a binary search on a vector of strings and keep getting this error. I just can't for the life of me figure out what is wrong, so if anyone could help me out that'd be really...
Results 1 to 12 of 12





Click Here to Expand Forum to Full Width

Featured