Hi everyone ! I've started like a few minutes ago and I was trying to make an expression parser. Right now I was just trying to see if I could retrieve all operator signs ( +,-,*,/.... ) but windows is crashing as soon as I've entered something as input, why ?
Here's the code:PS: I know it looks newbish but it's the case, lol I'm a C# newbie.Code:using System ; namespace Maths { public class IO { private static string Equation ; public static void ReadEquation( ) { Equation = Console.ReadLine( ) ; } public static void WriteEquation( ) { Console.WriteLine( "The equation is: {0}", Equation ) ; } public static string GetEquation( ) { return Equation ; } } public class Operations { protected static char[] Operators ; protected static int Size ; public static void GetOperators( ) { Size = 0 ; for( int i = 0 ; i < Maths.IO.GetEquation( ).Length ; ++i ) { char temp = Maths.IO.GetEquation( )[i] ; if( ( temp == '+' ) || ( temp == '-' ) || ( temp == '*' ) || ( temp == '/' ) ) { Operators[ Size++ ] = temp ; } } } } } public class MyProject { public static void Main( ) { Maths.IO.ReadEquation( ) ; Maths.Operations.GetOperators( ) ; } }