All pastes #263685 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2006-12-01 18:59 UTC
rendered paste body
#include <iostream>#include <string>#include <sstream>public:   void ConvertStr( string strVal )   {      string strVal = str;      try      {         strVal = System::Convert::ToInt64( strVal );      }      catch ( System::OverflowException^ )       {         System::Console::WriteLine( "Overflow in long-to-char conversion." );      }   }int main()	{	long vars[4]={ "a", "b", "c", "d"};	long g, h;	char Restart;	char roman[4][3]={"I","II","III", "IV"};	bool nFound = false;	string str; 		std::cout<<"Hello, welcome to Shayne's Equality Calculator!\n";	std::cout<<"Imagine the equality layed out as an X Y graph,\n";	std::cout<<"with each quadrant numbered 1 - 4. Please input\n";	std::cout<<"the data accordingly, using x as the variable.\n\n\n";		for(int x = 0; x < 4; x++) 		{            std::cout<<"Quadrant " << roman[x] <<std::endl;            std::cin >>str;			if(str == "x")			{				if(nFound = false)				{					nFound = true					str >> vars[x]				}				else				{					std::cout<<"Error\n";					return 1;				}			else			{				ConvertStr(str, strVal)				strVal >> vars[x];			}		}