Search:

Type: Posts; User: DivineSlayer936

Search: Search took 0.00 seconds.

  1. Replies
    19
    Views
    2,458

    This is how I did my file. ofstream outfile...

    This is how I did my file.

    ofstream outfile ("C:\\Documents and Settings\\Scott\\Desktop\\C++\\SetOutput.txt");
  2. Replies
    19
    Views
    2,458

    Do you mean outfile

    Do you mean outfile << endl; ?
    This is the code in my main while loop:


    Set a;
    a.readFromFile(myfile);
    outfile<<a;
    Set d(a.readOperator(myfile));
    Set result(d);
    result.order();
  3. Replies
    19
    Views
    2,458

    It's all working nicely now except for one...

    It's all working nicely now except for one detail. When I do "outfile << "\n" it doesnt move down a line like it should? Is there another way to do this?
  4. Replies
    19
    Views
    2,458

    You really are my hero. It worked.

    You really are my hero. It worked.
  5. Replies
    19
    Views
    2,458

    I changed displaySet to const in both the .h and...

    I changed displaySet to const in both the .h and .cpp and now it gives me the error "undefined reference to 'Set::displaySet()'". :(
  6. Replies
    19
    Views
    2,458

    Hmm. void displaySet() const; void...

    Hmm.


    void displaySet() const;


    void Set::displaySet() const
    {
    cout << "{";
    for(int i=1;i<=myList.getLength();i++)
  7. Replies
    19
    Views
    2,458

    Hate to bother you again, but is there any easy...

    Hate to bother you again, but is there any easy explanation for why it gives the error "undefined reference to 'Set::displaySet()'" when i declare that method as a const. It works when it isn't const.
  8. Replies
    19
    Views
    2,458

    Thank you so much! That works. :D

    Thank you so much! That works. :D
  9. Replies
    19
    Views
    2,458

    The program works fine just before I included the...

    The program works fine just before I included the 2 code snippets from above. I had it printing with cout and I just wanted to get the overloading code right before I actually used it in my driver.
  10. Replies
    19
    Views
    2,458

    I get "In file included from Set.cpp" "expected...

    I get "In file included from Set.cpp"
    "expected constructor, destructor, or type conversion before '&' token"
    "expected `,' or `;' before '&' token"

    What do I have to include?
  11. Replies
    19
    Views
    2,458

    Overloaded

    Quick question. If I have a method to overload the << operator:
    Header:


    ostream& operator <<(ostream &os, const Set &s);


    In the cpp:
  12. Replies
    12
    Views
    2,420

    Awesome, I managed to get it reading. My question...

    Awesome, I managed to get it reading. My question is a different one now. My program will compile and prints out the first Set addition perfectly the way I wanted it to. Unfortunately, after the...
  13. Replies
    12
    Views
    2,420

    Thank you laserlight. That helped me fix the...

    Thank you laserlight. That helped me fix the including errors I had. One of my main questions is about the lines "myFile >> seperator;" I've used lines such as these in my other programs but in this...
  14. Replies
    12
    Views
    2,420

    Okay I changed some of the small problems. ...

    Okay I changed some of the small problems.


    The errors I get when compiling are:
    "In file included from Set.cpp "
    "variable or field `readFromFile' declared void"
    "expected `;' before '('...
  15. Replies
    12
    Views
    2,420

    Desolation: If you read properly, I state "I'm...

    Desolation: If you read properly, I state "I'm having trouble finding a way to read through multiple lines and reading the various characters into the Set class." And the question, Can you help me...
  16. Replies
    12
    Views
    2,420

    Reading lines from a File

    This is an insanely simple problem I'm sure. I started a c++ class with no c++ history and only java. The class started out in recursion and I've been struggling through it. I have one day to finish...
Results 1 to 16 of 16