initializing argument 1 of `...

This is a discussion on initializing argument 1 of `... within the C++ Programming forums, part of the General Programming Boards category; I've come across an error that i can't even begin to understand. I have a function that turns text into ...

  1. #1
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Question initializing argument 1 of `...

    I've come across an error that i can't even begin to understand.
    I have a function that turns text into a class (file2Agent()). It calls a function that reads formatted text in a file (read(ifstream)). I have no idea what's wrong.

    here's the code for file2Agent:
    Code:
    agent *fileManager::file2Agent()
    {
          cerr<<"mark 3";
          agent *phead= 0;
          cin.get();
    
          ifstream fin("agents.DATA");
          if(!fin) //did we get the file open?
          {
           cerr<<endl<<endl<<"\aCouldn't open file in agent *fileManager::file2Agent()"; //nope
           return phead;
          }//if
          vector <agent*> parray; 
          while (1) //get an agent
          {
           phead = read(fin); //compiler complains about this line
           if (phead != 0);
           {
            parray.push_back(phead); //put it into a vector
            continue;
           }//if
           break;
          }//while
          cin.get();
          fin.close();
          vector2Agent(parray,phead); 
          cerr<<endl<<endl;
          phead->display(); //testing
          return phead;      
    }//file2Agent
    here's the code for read:
    Code:
    agent* fileManager::read(ifstream fin)
    {
          agent *phead = 0;
          char ch;
          int id;
          string s1,s2,s3;
          while (fin.get(ch)) //read a character
          {
           if (ch = 'a') //is it the begining of an agent
           {
            fin.get(ch); //eat up newline
            id = getNum(fin);//if making additions or subtractions to agent class; mod these---
            s1 = getString(fin); //                                                          |  
            s2 = getString(fin);//                                                           |
            s3 = getString(fin);//                                                           |
            phead = new agent(id,s1,s2,s3,0);//                                             ---
            return phead;
           }//if
          }//while
          return phead; //no agent found
    }//read()
    here's the error:
    In file included from archivermain.cpp

    In copy constructor `std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> >&)':

    `std::ios_base::ios_base(const std::ios_base&)' is private

    within this context

    In copy constructor `std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(const std::basic_filebuf<char, std::char_traits<char> >&)':

    `std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits<char>]' is private

    within this context

    In member function `agent* fileManager::file2Agent()':
    initializing argument 1 of `agent* fileManager::read(std::ifstream)'
    Thank you

  2. #2
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Question

    well i partially solved it. I got rid of that error by passing all ifstream objects by reference instead of value. Now I'm running into an 'access violation(segmentation fault)' during runtime.

    here's the new file2Agent:

    Code:
    agent *fileManager::file2Agent()
    {
          cerr<<"mark 3";
          agent *phead= 0;
          cin.get();
    
          ifstream fin("agents.DATA");
          if(!fin) //did we get the file open?
          {
           cerr<<endl<<endl<<"\aCouldn't open file in agent *fileManager::file2Agent()"; //nope
           return phead;
          }//if
          vector <agent*> parray; 
          while (1) //get an agent
          {
           ifstream *pin = 0;
           pin = &fin;
           phead = read(pin); //!!!ACCESS VIOLATION RAISED HERE!!!
           if (phead != 0);
           {
            parray.push_back(phead); //put it into a vector
            continue;
           }//if
           break;
          }//while
          cin.get();
          fin.close();
          vector2Agent(parray,phead); 
          cerr<<endl<<endl;
          phead->display(); //testing
          return phead;      
    }//file2Agent
    here's read() getString() and getNum()(problem in getString()):
    Code:
    //..::FUNCTION fileManager::getString()::..
    //reads a string from a formatted text file
    string fileManager::getString(ifstream *fin)
    {
           char ch;
           string str;
           int x = 0;
           while (1)
           {
            fin->get(ch); 
            if(ch != '\n')
            {
             str[x] = ch; //after debugger displays access violation popup it jumps to this line and higlights it
             x++;
             continue;
            }//if
            break;
           }//while
           return str;
    }
    
    //..::FUNCTION fileManager::getNum()::..
    //reads a string from a formatted text file
    int fileManager::getNum(ifstream *fin)
    {
           char ch;
           string str;
           int x = 0;
           while (1)
           {
            fin->get(ch); 
            if(ch != '\n')
            {
             str[x] = ch;
             x++;
             continue;
            }//if
            break;
           }//while
           x = atoi( str.c_str());
           return x;
    }
    Last edited by A10; 10-28-2007 at 10:33 PM.

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,801
    Quote Originally Posted by A10 View Post
    I've come across an error that i can't even begin to understand.
    I have a function that turns text into a class (file2Agent()). It calls a function that reads formatted text in a file (read(ifstream)). I have no idea what's wrong.

    here's the code for file2Agent:
    Code:
    agent *fileManager::file2Agent()
    {
        ...
        phead = read(fin); //compiler complains about this line
        ...
    }//file2Agent
    here's the error:
    In file included from archivermain.cpp

    In copy constructor `std::basic_ios<char, std::char_traits<char> >::basic_ios(const std::basic_ios<char, std::char_traits<char> >&)':

    `std::ios_base::ios_base(const std::ios_base&)' is private

    within this context

    In copy constructor `std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf(const std::basic_filebuf<char, std::char_traits<char> >&)':

    `std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char, _Traits = std::char_traits<char>]' is private

    within this context

    In member function `agent* fileManager::file2Agent()':
    initializing argument 1 of `agent* fileManager::read(std::ifstream)'
    The error is basically saying that you can't copy a stream. There are reasons for this. The typical way of doing things is to have your function accept a reference to the stream instead of a copy which is what you're trying to do. You'd need to change your read function to this:
    Code:
    agent* fileManager::read(ifstream& fin)
    {
        ...
    }//read()


    Code:
    while (1) //get an agent
    {
        ifstream *pin = 0;
        pin = &fin;
        phead = read(pin); //!!!ACCESS VIOLATION RAISED HERE!!!
        if (phead != 0);
        {
            parray.push_back(phead); //put it into a vector
            continue;
        }//if
        break;
    }//while
    I don't think you should be doing that. What does you're read function look like... don't tell me it hasn't changed any. A normal read loop would look more like:
    Code:
    while( do some read operation that returns a reference to the stream )
    {
            parray.push_back(phead); //put it into a vector
    }//while
    To make that work you'd need to create a function that returns a reference to the stream you're working on, this is usually done with an overloaded stream extraction operator (operator>>) which in your case would be overloaded for a type of agent:
    Code:
    class agent
    {
        friend std::ostream& operator>>(std::ostream&,agent&);
    };
    
    std::ostream& operator>>(std::ostream& os,agent& agnt)
    {
        // Do your code to read from the stream and stuff the values into your agent class here
        return os;
    }
    Then the above read loop would become more like:
    Code:
    vector <agent> parray; 
    agent temp;
    while(fin >> temp)
    {
        parray.push_back(temp);
    }

    Code:
    string fileManager::getString(ifstream *fin)
    {
        char ch;
        string str;
        int x = 0;
        while (1)
        {
            fin->get(ch); 
            if(ch != '\n')
            {
                str[x] = ch; //after debugger displays access violation popup it jumps to this line and higlights it
                x++;
                continue;
            }//if
            break;
        }//while
        return str;
    }
    Yeah, I'd think so. str[x] does not exist, the string is empty so trying to reference a location that does not exist is going to create problems. You need to append or insert the characters instead. Better yet, there is a handy function called getline that will do what you seem to be wanting to do. You also need to try passing the stream by reference, it's easier and is more the standard way of doing things. Personally I'd just scrap these extra get functions as it seems that just using the basic >> (or maybe getline) would get you what you want.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  4. #4
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Question

    Quote Originally Posted by hk_mp5kpdw View Post

    Code:
    string fileManager::getString(ifstream *fin)
    {
        char ch;
        string str;
        int x = 0;
        while (1)
        {
            fin->get(ch); 
            if(ch != '\n')
            {
                str[x] = ch; //after debugger displays access violation popup it jumps to this line and higlights it
                x++;
                continue;
            }//if
            break;
        }//while
        return str;
    }
    Yeah, I'd think so. str[x] does not exist, the string is empty so trying to reference a location that does not exist is going to create problems. You need to append or insert the characters instead. Better yet, there is a handy function called getline that will do what you seem to be wanting to do. You also need to try passing the stream by reference, it's easier and is more the standard way of doing things. Personally I'd just scrap these extra get functions as it seems that just using the basic >> (or maybe getline) would get you what you want.
    I don't know what I was thinking when I did that. getline is obvious. Thank you



    Now I'm running into 2 more access violations (2 at the same time, how is that even possible?) while attempting to work your suggestions into my code. I can't figure out what's wrong now.

    I added this line to my agent class:
    Code:
    friend ifstream& operator>>(ifstream&,agent*);
    and out side the class:
    Code:
    ifstream& operator>>(ifstream& rfin,agent *pnext)
    {
          char ch;
          int id;
          string s1,s2,s3,sid; //ACCESS VIOLATION RAISED HERE
          while (rfin.get(ch)) //read a character
          {
           if (ch = 'a') //is it the begining of an agent
           {
            rfin.get(ch); //eat up newline
            getline(rfin,sid);//if changing agent class, mod these
            getline(rfin,s1); 
            getline(rfin,s2);
            getline(rfin,s3);
            id = atoi(sid.c_str());
            pnext->setIdNum(id);    //define agent
            pnext->setClientName(s1);
            pnext->setFileType(s2);
            pnext->setPath(s3);  
            pnext->display(); //testing                                      
           }//if
          }//while
          return rfin; //no agent found
    }
    In file2Agent even though there's data for 1 agent in the txt file it's reading, it never puts the agent into the array. I marked the line : //line HERE

    here's the file2agent:
    Code:
    agent *fileManager::file2Agent()
    {
          cerr<<"mark 3";
          agent *phead= 0;
          cin.get();
    
          ifstream fin("agents.DATA");
          if(!fin) //did we get the file open?
          {
           cerr<<endl<<endl<<"\aCouldn't open file in agent *fileManager::file2Agent()"; //nope
           return phead;
          }//if
          vector <agent*> parray;
          string s1 = " ",s2 = " ",s3 = " ";
          agent *pnext = new agent(0, s1,s2,s3,0); 
          while (fin >> pnext) //get an agent  //!IF I DON'T STEP INTO THIS IN THE DEBUGGER I DON'T GET AN ACCESS VIOLATION
           {
            parray.push_back(pnext); //put it into a vector //line HERE
           }//if
          cin.get();
          fin.close();
          vector2Agent(parray,phead); 
          cerr<<endl<<endl;
          phead->display(); //testing
          return phead;      
    }//file2Agent


    When I step into the vector2Agent function I get an access violation. This is strange because it works fine elsewhere in my program.

    here's vector2Agent:
    Code:
    void vector2Agent(vector<agent*> &parray, agent *&phead) 
    {
          phead = parray[0]; //ACCESS VIOLATION RAISED HERE
          agent *pnext = phead;
          for(unsigned int x = 1; x < parray.size(); x++)
                  {
                      pnext->setNextAgent(parray[x]);
                      pnext = pnext->getNextAgent();
                  }
          pnext->setNextAgent(0); //don't want the list to infinitly loop    
          
    }
    this all happens when trying to read data from a txt file that only contains the data of one agent.

    Thanks
    Last edited by A10; 10-29-2007 at 07:02 PM.

  5. #5
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,801
    Are you really set on a vector of pointers instead of a vector of actual objects? A vector of objects is more useful considering what happens when the vector is destructed.


    Code:
    agent *pnext = new agent(0, s1,s2,s3,0); 
    while (fin >> pnext) //get an agent  //!IF I DON'T STEP INTO THIS IN THE DEBUGGER I DON'T GET AN ACCESS VIOLATION
    {
        parray.push_back(pnext); //put it into a vector //line HERE
    }
    When you call push_back, the copy constructor of the type is called to make a copy which is inserted into the vector. Since your type is a pointer, a copy of the pointer (an address) is pushed onto the vector. Since there is only one new'd agent, the same exact pointer (address) is getting copied into the vector each time you call push_back. This means once your vector is filled, it will consist of nothing but pointers to the same single instance of the agent class which will likely contain the contents of the last successful read from the file. Needless to say, this is not what you want. The stream extraction operator should work on a reference to the agent class, not a pointer and the vector should be a vector<agent> and not a vector<agent*>. Pointers have there place, but try to avoid using them except where really necessary, you're making things overly complicated here.

    Code:
    string s1,s2,s3,sid; //ACCESS VIOLATION RAISED HERE
    Don't know why an access violation is raised on a simple declaration.

    [edit]More on the matter of the vector of agent pointers. When the vector goes out of scope, the items contained within will be destructed, for a simple pointer value, nothing will happen to the object(s) pointed to, they will remain in memory and not go away until the program ends. This is a memory leak. You'd at least need some kind of auto pointer to make that work otherwise you'd have to manually go through each element in the vector and call delete yourself on the pointer. Another reason to just use a vector of agents instead of a vector of pointers to agents.[/edit]
    Last edited by hk_mp5kpdw; 10-29-2007 at 07:25 PM.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  6. #6
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Question

    I was trying to avoid adding a new vector2Agent function that took a vector<agent> instead. I implimented your suggestion of a vector of objects and now it works...kinda.

    Switching to a vector of objects made things a lot easier btw.Thank You. I overloaded vector@Agent with one that took a vector<agent> instead. Later I might convert the rest of my code to get off the vector<agent*> but not today.

    I ran into an access violation in another part of my code but this time It's something simple enough that I could see what the problem is. I just don't know how to fix it. In th function file2Agent the read loop:

    Code:
          while (fin >> empty) //get an agent
           {
            parray.push_back(empty); //put it into a vector
           }//if
    the overloaded operator is working just fine and reading in the data I want from a file and it's returning a reference to an ifstream object but the code in the while loop never executes and the newly read in agent never gets appended to the array. This leaves me with an empty array that causes problems in later code when I try to access the agent. My question is how can I get the code in the while loop to execute for any number of agents that might be in the txt file i'm reading from? (so how do i make (fin>> empty) evaluate to true as long as an agent has been read in?)

  7. #7
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,801
    Show your code for the overloaded stream extraction operator (operator>>) that extracts an agent from the stream and also your definition of the agent class. Also show the complete code for your file2Agent function and the fileManager class definition. Also, explain what you mean by getting this access violation. Where does it occur and show any code involved in that if it's not covered by the other's you will post?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  8. #8
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85
    here's the agent class definition with the overloaded operator:
    Code:
    class agent
    {
          public:
                 agent(){}
                 agent(int idNum, string clntNm, string clntFT, string pTC, agent *next);
                 ~agent(){listLength--;}
                 int getIdNum() const {return idNumber;}
                 void setIdNum(int newId) {idNumber = newId;}
                 string getClientName() const {return clientName;}
                 void setClientName(string newClientName) {clientName = newClientName;}
                 string getFileType() const {return clientName;}
                 void setFileType(string newFileType) {clientFileType = newFileType;}
                 string getPath() const {return clientName;}
                 void setPath(string newFilePath) {pathToClient = newFilePath;}             
                 agent *getNextAgent() const {return nextAgent;}
                 void setNextAgent(agent *newNextAgent) {nextAgent = newNextAgent;}
                 void setNextAgent(agent &newNextAgent) {nextAgent = &newNextAgent;}
                 void display();
                 friend ifstream& operator>>(ifstream&,agent*);
                 static int listLength; 
          private:
                  int idNumber;
                  agent *nextAgent; //a pointer to the next agent
                  string clientName; //its clients name
                  string clientFileType; //and its clients file type
                  string pathToClient; //where client is located on Hard Disk
    
    };
    int agent::listLength = 0;
    
    agent::agent(int idNum, string clntNm, string clntFT, string pTC, agent *next): idNumber(idNum), 
    clientName(clntNm), clientFileType(clntFT), pathToClient(pTC)
    {
                        listLength++;
                        nextAgent = next;
    }//agent::agent(int,string,string,string,agent*)
    void agent::display()
    {     
         cout<<idNumber << "\t" <<clientName<< "|\t" << clientFileType << "|\t"<< pathToClient;
         cout<< "..." << endl;
    }               
    ifstream& operator>>(ifstream& rfin,agent &rnext)
    {
          char ch;
          int id;
          string s1,s2,s3,sid;
          while (rfin.get(ch)) //read a character
          {
           if (ch = 'a') //is it the begining of an agent
           {
            rfin.get(ch); //eat up newline
            getline(rfin,sid);//if changing agent class, mod these
            getline(rfin,s1); 
            getline(rfin,s2);
            getline(rfin,s3);
            id = atoi(sid.c_str());
            rnext.setIdNum(id);    //define agent
            rnext.setClientName(s1);
            rnext.setFileType(s2);
            rnext.setPath(s3);  
            rnext.display();      //agent successfully read in here and displays correctly                                   
           }//if
          }//while
          return rfin;
    }

    here's the fileManager class with the file 2 agent definition:

    Code:
    class fileManager
    {
          public:
                 fileManager();
                 ~fileManager() {}
                 agent *file2Agent();
                 void agent2File(agent *phead);
                 long getFileSize(ifstream *pin);
                 
          private:
    };
    
    fileManager::fileManager()
    {}
    //..::FUNCTION file2Agent()::..
    //reads a file and creates a list of agents out of that
    agent *fileManager::file2Agent()
    {
          cerr<<"mark 3";
          agent *phead= 0;
          cin.get();
    
          ifstream fin("agents.DATA");
          if(!fin) //did we get the file open?
          {
           cerr<<endl<<endl<<"\aCouldn't open file in agent *fileManager::file2Agent()"; //nope
           return phead;
          }//if
          vector <agent> parray;
          agent empty;
          while (fin >> empty) //gets an agent successfully butt...
           {
            parray.push_back(empty); //this code still never executes
           }//if
          cin.get();
          fin.close();
          vector2Agent(parray,phead);
          cerr<<endl<<endl;
          phead->display();
          return phead;      
    }//file2Agent
    here's where the access violation is:

    Code:
    //..::FUNCTION vector2Agent::..
    //turns an vector into a singly linked list
    void vector2Agent(vector<agent> &parray, agent *&phead) 
    {
          phead = &parray[0]; //
          agent *pnext = phead;
          cerr<<parray.size();
          if (parray.size() == 0)
          {
           phead = 0;
           return;
          }
          for(unsigned int x = 0; x < parray.size(); x++)
                  {
                      pnext->setNextAgent(&parray[x]);
                      if (parray.size() >= 2)
                       pnext = pnext->getNextAgent();
                  }
          pnext->setNextAgent(0); //pnext doesn't exist so access violation raised here.
          
    }
    The text file contains the formatted text of 1 agents worth of data.


    Thanks again
    Last edited by A10; 10-30-2007 at 06:17 PM. Reason: funny comment

  9. #9
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Smile

    I discovered the problem. I had written the operator>> functions returns in the wrong place. It now looks like this:
    Code:
    ifstream& operator>>(ifstream& rfin,agent &rnext)
    {
          char ch;
          int id;
          string s1,s2,s3,sid; //ACCESS VIOLATION RAISED HERE
          while (rfin.get(ch)) //read a character
          {
           if (ch = 'a') //is it the begining of an agent
           {
            rfin.get(ch); //eat up newline
            getline(rfin,sid);//if changing agent class, mod these
            getline(rfin,s1); 
            getline(rfin,s2);
            getline(rfin,s3);
            id = atoi(sid.c_str());
            rnext.setIdNum(id);    //define agent
            rnext.setClientName(s1);
            rnext.setFileType(s2);
            rnext.setPath(s3);  
            rnext.display();
            return rfin;                                   
           }//if
          }//while
          return rfin;
    }
    I'm now working on another problem but it's something I understand. Thanks for all your help.

  10. #10
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Question Why isn't this obvious to me...

    I now have a problem with an operator=. I think the answer should be obvious but I'm not seeing it.

    Here's the operator=(it's in my agent class):

    Code:
    agent agent::operator=(agent &agentFull)
    {
         this->setClientName(agentFull.getClientName()) ;
         this->setIdNum(agentFull.getIdNum());
         this->setFileType(agentFull.getFileType());
         this->setPath(agentFull.getPath());
         this->setNextAgent(0);
         return *this;
    }
    (side note: What does rhs stand for and why do people use it?)

    I run into a problem when I try to use it with my file2Agent function. It gives me this error:

    Code:
    no match for 'operator=' in 'temp = fileManager::file2Agent()()' 
     note candidates are: agent agent::operator=(agent&)
    here's where I call it:

    Code:
    agent temp;
        cerr<<"mark 1";
        temp = GLOBALfile.file2Agent(); //GLOBALfile is an instance of my fileManager class. I've forgotten why it's global now
    here's the file2Agent() (it returns a single agent by value):
    Code:
    agent fileManager::file2Agent()
    {
          cerr<<"mark 3";
          agent empty;
          agent *phead = 0;
          empty.setIdNum(-1);
          cin.get();
    
          ifstream fin("agents.DATA");
          if(!fin) //did we get the file open?
          {
           cerr<<endl<<endl<<"\aCouldn't open file in agent *fileManager::file2Agent()"; //nope
           return empty;
          }//if
          vector <agent> parray;
          while (fin >> empty) //get an agent
           {
            parray.push_back(empty); //put it into a vector
           }//if
          cin.get();
          fin.close();
          cerr<<"in";
          vector2Agent(parray,phead);
          cerr<<"out";
          empty = *phead;
          return empty;      
    }//file2Agent
    Will I run into problems with the agents in the list after the agent I pass by value due to pointer/scope problems? Is it possible to template an overloaded operator?

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Too lazy at the moment to look at your code, but rhs stands for right-hand side and refers to the argument that is on the right side of a binary operator, whereas lhs is on the left side.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    A10
    A10 is offline
    Registered User
    Join Date
    Nov 2006
    Posts
    85

    Cool

    Well I decided to take another route. Instead of having file2Agent convert the vector to a singly linked list, I passed in a reference to a vector<agent> and returned an address to a vector<agent>. This avoided any issues with pointers referencing data that had gone out of scope(stupid 0xfeeefeee), and was just easier to code. Thanks cornedBee. Now rhs/lhs makes sense to me rather then being a random collection of letters.

    In short It works as it should


    Thanks for all your help Hk_!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. member as default argument
    By MarkZWEERS in forum C++ Programming
    Replies: 2
    Last Post: 03-23-2009, 08:09 AM
  2. getopt - parsing string as argument
    By bertazoid in forum C Programming
    Replies: 13
    Last Post: 02-05-2009, 03:35 PM
  3. function passing argument..array ?
    By jochen in forum C Programming
    Replies: 2
    Last Post: 09-30-2007, 11:53 AM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  5. Nested loop frustration
    By caroundw5h in forum C Programming
    Replies: 14
    Last Post: 03-15-2004, 08:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21