I've gotten my project off the floor (this forum has been extremely helpful) but I've encountered a new problem :\
I've gotten a program written that can read data from Excel spreadsheet cells and display/paste them elsewhere, and as long as they're integers I'm fine. The other information comes in this format 'XX XX XXXU', where Xs are numerical digits and Us are qualifying alphabetical values. I need to be able to store these values so that I can use them elsewhere and I can't seem to do so.
If I try to store them in a string the program will compile and them crash on me when it gets to the point where I try to store the value.
int i=0; <------An integer to store account numbers
string t=""; <------A string to store the turnout where they get the water we sell
...
Excel::_WorksheetPtr pSheet = XL->ActiveSheet;
Excel::RangePtr pRange = pSheet->Cells;
i = pRange->Item[26][3]; <-----Stores a number as an integer fine.
t = pRange->Item[26][2]; <-----This is where is freezes
std::cout << "Account Number is: "<< i << std::endl; //Displays number
std::cout << "Next Account Number is: "<< t << std::endl;
t = pRange->Item[27][3]; is where the foul up is as it tries to store the cell value (Cell B27) as a string.
COM uses a special type of string,
http://msdn.microsoft.com/en-us/library/ms221069%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/zthfhkd6%28VS.80%29.aspx