I am currently trying to change an integer to a string. I am successful in that, but I am unable to make my program's class return the string without error. It states that "no operator "[]" matches these operands. The issue is in my last "for" statement in my LargeInt.cpp, first "cout". Any suggestions?
LargeInt.h
1 2 3 4 5 6 7 8 9 10 11 12 13
#pragma once
class LargeInt
{
public:
LargeInt() {};
void ADDITION();
private:
int Number1[255], Number2[255] , ADD[255];
char S1[255], S2[255];
int L1, L2;
};
‘final’ is a reserved word: http://en.cppreference.com/w/cpp/language/final You can’t declare a variable named ‘final’.<-- Wrong. See Repeater’s correction below.
To create a std::string from an int array, you need to transform any ‘int’ back into a ‘char’.