I will not paste the whole program, but just the included files and the errors, as I am very sure, the error lies there itself!
Files included in VS 2010
#include <cstdlib>
#include <windows.h>
#include "iostream"
#include "conio.h"
#include "vector"
#include "math.h"
#include <string.h>
#include <bitset>
Files included in Visual C++ 6.0
#include <cstdlib>
#include <windows.h>
#include "iostream"
#include "conio.h"
#include "vector"
#include "math.h"
#include <string.h>
#include <bitset>
#include <String>
Well, there is just one difference, I added #include <String> in Visual C++ 2006, this particular file reduced the error which read as
error C2678: binary ‘!=’ : no operator defined which takes a left-hand operand of type () ‘class std::basic_string,class std::allocator >’
(or there is no acceptable conversion)
The other major errors I am still facing in VS2006 are
Line : str.append(to_string((long double)(value)));
Error: error C2065: 'to_string' : undeclared identifier
Line: vector <vector <float>> distOfSectionPoint, momentAtSectionPoint, preFinalMoment, finalMoments, momentAtSectionPtOnPtLoadProfile ;
Error: error C2208: 'class std::vector' : no members defined using this type
Can anyone explain what goes wrong in Visual C++ 2006??
Assuming
to_stringisstd::to_string, then that’s a C++11 function which won’t be available in older compilers. You could cobble together something roughly equivalent, likeThe error involving
vectoris caused by the two closing angle-brackets, which older compilers would interpret as a single>>token. Add a space between them:It’s not quite clear which compiler you’re using, since there was no Visual C++ 2006. If you actually mean Visual C++ 6.0 (from 1998), then you’re probably doomed. There have been two major language revisions since then, making it very difficult to write code supported by both that compiler, and modern compilers. If you mean 2005 or 2008, then just be careful to avoid C++11 features.