diff options
author | Adrian Kummerländer | 2012-04-15 00:26:12 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2012-04-15 00:26:12 +0200 |
commit | 4daed5ebe3e8eae184a96055974ac15a3c55507f (patch) | |
tree | 900920a59780915d8b8eb75eccdf6afd45c680e0 /main.cpp | |
parent | de97f27c7aa3c74a40d5ba7ce9477d4bbdefbe8e (diff) | |
download | SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar.gz SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar.bz2 SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar.lz SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar.xz SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.tar.zst SimpleParser-4daed5ebe3e8eae184a96055974ac15a3c55507f.zip |
Removed all memory leaks detected by valgrind
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,13 +8,13 @@ int main(int argc, char *argv[]) std::cin >> inputTerm; // Example: 2.5*(2+3-(3/2+1)) - Parser *parser = new Parser(); + Parser parser; try { typedef std::numeric_limits<double> dbl; std::cout.precision(dbl::digits10); - std::cout << parser->calculate(inputTerm, false).result << std::endl; + std::cout << parser.calculate(inputTerm, false).result << std::endl; } catch ( exception &e ) { |