GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Apr-2005, 14:07
jkube1980 jkube1980 is offline
New Member
 
Join Date: Apr 2005
Posts: 4
jkube1980 is on a distinguished road

Unfamiliar with this compilation error code <compilation of class into object file>


Hi all:

I've been attempting to compile this code for the past couple of days with no success (after many variations). Any and all input is greatly appreciated. I"ll list the error codes produced when attempting to compile; then the pertinent code < SortedList.cpp>. The error is probably an elementary one that I just don't have enough experience to recognize.

Thanks,
J


Code:
//Compilation errors $ cpp -c SortedList.cpp /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h: In method `class fstreambase & fstreambase::operator =(class fstreambase &)': /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h:127: `class ios & ios::operator =(class ios &)' is private SortedList.cpp:100: within this context /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h: In method `class ostream & ostream::operator =(class ostream &)': /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h:127: `class ios & ios::operator =(class ios &)' is private SortedList.cpp:100: within this context /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h: In method `ofstream::ofstream(const class ofstream &)': /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h:128: `ios::ios(const class ios &)' is private SortedList.cpp:103: within this context /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h: In method `fstreambase::fstreambase(const class fstreambase &)': /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h:128: `ios::ios(const class ios &)' is private SortedList.cpp:103: within this context /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h: In method `ostream::ostream(const class ostream &)': /opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.8.1/g++-include/streambuf.h:128: `ios::ios(const class ios &)' is private SortedList.cpp:103: within this context

CPP / C++ / C Code:
  //SortedList.cpp  lines 1 - 12

#include "SortedList.h"
#include <iomanip>
#include <iostream>

using namespace std;

// Private members of class:
//    int      length;           Length of the SortedList
//    ItemType data[MAX_LENGTH]; Array holding the SortedList items
//    int      currentPos;     Position of next item to be accessed
//    void     BinSearch( ItemType, bool&, int& ) const;   Helper
//                                                         function      

//****************Jump to pertinent code*******************
//    Lines  81 - 110

void SortedList::Insert( /* in */ ItemType& item )  //Line 81

// Inserts item into the SortedList

// Precondition:
//     length < MAX_LENGTH
//  && data[0..lengthÐ1] are in ascending order
// Postcondition:
//     item is in the SortedList
//  && length == length@entry + 1
//  && data[0..lengthÐ1] are in ascending order

{
    int index;    // Index and loop control variable
    index = length-1;

    if (item.GetNumber() == 0)
    {
         item.SetNumber(data[length-1].GetNumber()+1);
         data[index]= item;       //Line 100
    }

    while (index >= 0 && item < (data[index]))   //Line 103
    {
        data[index+1] = data[index];
        index--;
    }
    data[index+1] = item;          // Insert item
    length++;
}



Thanks for looking through this. I appreciatte any and all input.
Last edited by LuciWiz : 24-Apr-2005 at 14:48. Reason: Broken code tags
  #2  
Old 24-Apr-2005, 14:57
jkube1980 jkube1980 is offline
New Member
 
Join Date: Apr 2005
Posts: 4
jkube1980 is on a distinguished road

Found my issue!


Sorry I don't know how to delete my original post! I've found the issue with my code (it's actually in an altogether different class) but haven't quite fixed my code. Thanks for your time. Sorry I can't delete my previous positng but I'll work on figuring that out once I get my assignment done.

Thanks for your time,
J
 
 

Recent GIDBlogDeveloping GUIs with wxPython (Part 4) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error C2146: syntax error : missing ',' before identifier 'C4' mattchew008 C++ Forum 2 19-Dec-2004 06:06

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:02.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.