]> Some of my projects - tal.git/commitdiff
gcc fixes
authorAPTX <marek321@gmail.com>
Tue, 30 Nov 2010 18:12:55 +0000 (19:12 +0100)
committerAPTX <marek321@gmail.com>
Tue, 30 Nov 2010 18:12:55 +0000 (19:12 +0100)
shared/shared.h
tal-algorithm/main.cpp

index f2c7ee1f084be7e8fb43dddbfadc429082125311..5770224394d2d2ebbb282f26e09dc340a2fc0819 100644 (file)
@@ -1,4 +1,5 @@
 #include <cstdlib>
+#include <climits>
 
 bool atoi_wrapper(const char *s, int *result)
 {
index f0a6a1fe847b68aaa225376d0582ca4e9b9ced5e..a810a2ced06d2428b1ea200758c0e686fea43d8f 100644 (file)
@@ -2,6 +2,8 @@
 #include <iomanip>
 #include <algorithm>
 #include <cmath>
+#include <cstring>
+#include <cstdio>
 #include "../shared/shared.h"
 
 using namespace std;
@@ -273,6 +275,7 @@ int main(int argc, char **argv)
        bool run_greedy_LowestWeight = false;
        bool run_greedy_BestRatio = false;
        int runs = 1;
+       Problem *p = 0;
 
        if (argc < 2)
                goto help;
@@ -310,7 +313,7 @@ int main(int argc, char **argv)
        }
 
        bool success;
-       Problem *p = read_problem(cin, &success);
+       p = read_problem(cin, &success);
 
        if (!success)
        {