Click here to Skip to main content
15,924,581 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help getting Unicode FILENAMES into an array Pin
Ryan Binns2-May-05 18:31
Ryan Binns2-May-05 18:31 
GeneralRe: Help getting Unicode FILENAMES into an array Pin
stvprg2-May-05 19:24
stvprg2-May-05 19:24 
GeneralRe: Help getting Unicode FILENAMES into an array Pin
Ryan Binns3-May-05 0:14
Ryan Binns3-May-05 0:14 
GeneralHelp to get WIN32_FIND_DATAW FindFileData from FindFirstFilesW into a file Pin
stvprg4-May-05 7:32
stvprg4-May-05 7:32 
GeneralRe: Help to get WIN32_FIND_DATAW FindFileData from FindFirstFilesW into a file Pin
Ryan Binns4-May-05 23:39
Ryan Binns4-May-05 23:39 
GeneralAvailable DLL / C++-SourceCode for 3D-presentation of rectangular solids of different sizes Pin
Roland F.2-May-05 12:26
Roland F.2-May-05 12:26 
GeneralRe: Available DLL / C++-SourceCode for 3D-presentation of rectangular solids of different sizes Pin
Christian Graus2-May-05 13:20
protectorChristian Graus2-May-05 13:20 
Generali still need just a little help Pin
Anonymous2-May-05 11:58
Anonymous2-May-05 11:58 
i have this header for my class file and then .....

#include<vector>

using namespace std;

class bigNumber;
bigNumber operator +(const bigNumber& lhs, const bigNumber& rhs);
bigNumber operator -(const bigNumber& lhs, const bigNumber& rhs);
bigNumber operator *(const bigNumber& lhs, const bigNumber& rhs);
ostream& operator<< (ostream& ostr, const bigNumber& t);
istream& operator>> (istream& istr, bigNumber& t);


class bigNumber{
public:
bigNumber();
bigNumber(const string & s);
bigNumber(vector<int> v);
friend bigNumber operator +(const bigNumber& lhs, const bigNumber& rhs);
friend bigNumber operator -(const bigNumber& lhs, const bigNumber& rhs);
friend bigNumber operator *(const bigNumber& lhs, const bigNumber& rhs);
friend ostream& operator<< (ostream& ostr, const bigNumber& t);
friend istream& operator>> (istream& istr, bigNumber& t);

private:
vector<int> digits;
void reverse ();
};


i have these member functions coded so far but i need help with the input operator

bigNumber::bigNumber(){

}

bigNumber::bigNumber(const string& s){
for(int i= 0; i < s.length();i++)
digits.push_back(s[i] - '0');
}

bigNumber::bigNumber(vector<int> v){
for(int j = 0; j < v.size(); j++)
digits.push_back(v[j]);
}

bigNumber operator +(const bigNumber& lhs, const bigNumber& rhs){
return 0;
}

bigNumber operator -(const bigNumber& lhs, const bigNumber& rhs){
return 0;
}

bigNumber operator *(const bigNumber& lhs, const bigNumber& rhs){
return 0;
}

ostream& operator<< (ostream& ostr, const bigNumber& t){
for(int k = 0; k < (t.digits).size();k++)
ostr << t.digits[k];
return ostr;
}

istream& operator>> (istream& istr, bigNumber& t){
istr >> t.digits;
return istr;
}


when i leave the input operator like it is i get an error saying

error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class std::vector<int,class std::allocator<int=""> >' (or there is no acceptable conversion)

i dont know how to fix this and i am really pressed for time can someone please help me?
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 13:23
protectorChristian Graus2-May-05 13:23 
GeneralRe: i still need just a little help Pin
Anonymous2-May-05 14:25
Anonymous2-May-05 14:25 
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 14:32
protectorChristian Graus2-May-05 14:32 
GeneralRe: i still need just a little help Pin
Anonymous2-May-05 15:06
Anonymous2-May-05 15:06 
GeneralRe: i still need just a little help Pin
Christian Graus2-May-05 15:31
protectorChristian Graus2-May-05 15:31 
QuestionUrgent ! How to instanciate an OCX control in an Office app? Pin
turenne2-May-05 11:50
turenne2-May-05 11:50 
GeneralMenu+Bitmaps recommendation Pin
peterchen2-May-05 11:43
peterchen2-May-05 11:43 
GeneralWMI Pin
Alex_Y2-May-05 8:40
Alex_Y2-May-05 8:40 
QuestionByte Chunker? Pin
OutlawTornNMT2-May-05 7:46
OutlawTornNMT2-May-05 7:46 
AnswerRe: Byte Chunker? Pin
Christian Graus2-May-05 13:24
protectorChristian Graus2-May-05 13:24 
QuestionHow to use &quot;Windows classic&quot; look on XP? Pin
Alan C. Balkany2-May-05 7:44
Alan C. Balkany2-May-05 7:44 
AnswerRe: How to use &quot;Windows classic&quot; look on XP? Pin
Ravi Bhavnani2-May-05 8:15
professionalRavi Bhavnani2-May-05 8:15 
GeneralRe: How to use &quot;Windows classic&quot; look on XP? Pin
Alan C. Balkany2-May-05 8:22
Alan C. Balkany2-May-05 8:22 
GeneralRe: How to use &quot;Windows classic&quot; look on XP? Pin
Ravi Bhavnani2-May-05 8:34
professionalRavi Bhavnani2-May-05 8:34 
GeneralRe: How to use &quot;Windows classic&quot; look on XP? Pin
Alan C. Balkany2-May-05 8:46
Alan C. Balkany2-May-05 8:46 
GeneralPath to user's desktop folder Pin
moredip2-May-05 7:24
moredip2-May-05 7:24 
GeneralRe: Path to user's desktop folder Pin
David Crow2-May-05 7:29
David Crow2-May-05 7:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.