스택을 메서드에 전달하는 적절한 방법은 무엇입니까? 내 메소드 호출에 잘못된 인수가 있다고 말하는 오류가 나타납니다.메서드에 스택 전달
string userInput = inputText.Text;
Stack<double> numbers= new Stack<double>();
Stack<char> operators = new Stack<char>();
bool output;
output = calculateExpression(userInput, Stack<double> numbers, Stack<char> operators);
내 정의 :
double calculateExpression(string userInput, Stack<double> numbers, Stack<char> operators)
{}
하는 당신은 할당 할 수 없습니다 bool에 두 배. 또는 오타가 무엇입니까? – Blorgbeard