aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorAdrian Kummerländer2012-04-15 00:26:12 +0200
committerAdrian Kummerländer2012-04-15 00:26:12 +0200
commit4daed5ebe3e8eae184a96055974ac15a3c55507f (patch)
tree900920a59780915d8b8eb75eccdf6afd45c680e0 /main.cpp
parentde97f27c7aa3c74a40d5ba7ce9477d4bbdefbe8e (diff)
downloadSimpleParser-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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 5044f18..d12119e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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 )
{