Can't seem to get the ISAAC template class to work

When ever i try using the isaac template class (here: http://burtleburtle.net/bob/cplus/isaac.hpp)
I always seem to get this compile-time error:
1
2
3
4
5
[natman3400@nathan pixl]$ g++ main.cc -o main -lcryptopp
In file included from main.cc:8:0:
isaac.hpp: In member function ‘virtual void QTIsaac<ALPHA, T>::randinit(QTIsaac<ALPHA, T>::randctx*, bool)’:
isaac.hpp:162:14: error: name lookup of ‘i’ changed for ISO ‘for’ scoping [-fpermissive]
isaac.hpp:162:14: note: (if you use ‘-fpermissive’ G++ will accept your code)


trying -fpermissive gives me this:

1
2
3
4
5
[natman3400@nathan pixl]$ g++ main.cc -o main -lcryptopp -fpermissive
In file included from main.cc:8:0:
isaac.hpp: In member function ‘virtual void QTIsaac<ALPHA, T>::randinit(QTIsaac<ALPHA, T>::randctx*, bool)’:
isaac.hpp:162:14: warning: name lookup of ‘i’ changed for ISO ‘for’ scoping [-fpermissive]
isaac.hpp:153:15: warning:   using obsolete binding at ‘i’ [-fpermissive]


and this is the code i am trying to run:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include </usr/include/cryptopp/sha.h>
#include <iostream>
#include <string>
#include </usr/include/cryptopp/hex.h>
#include <sstream>
#include </home/natman3400/pixl/BigIntegerLibrary.hh>
#include </home/natman3400/pixl/BigInteger.hh>
#include "isaac.hpp"
using namespace std;

int main()
{
 QTIsaac<8,ISAAC_INT> herp;
 std::string digest;
 std::string digest2;

CryptoPP::SHA512 hash;  // don't use MD5 anymore. It is considered insecure

// Thank you, Wei Dai, for making this possible:
string mystr;
cout << "Input the desired string to be hashed" << "\n";
getline (cin, mystr);
CryptoPP::StringSource foo(mystr, true,
   new CryptoPP::HashFilter(hash,
      new CryptoPP::HexEncoder (
         new CryptoPP::StringSink(digest))));
CryptoPP::StringSource foo2(mystr, true,
   new CryptoPP::HashFilter(hash,
         new CryptoPP::StringSink(digest2)));
char *derp = (char*)digest2.c_str();
for(int i =0;i<32;i++){
 derp[i]=(char)(abs((int)derp[i])); 
}
std::cout << derp << std::endl;
std::cout << digest << std::endl;
  
  return 0;
}


Thank you in advance for any help you can offer.
In case it is relevant, i am using fedora 16 x64_86.
I can't even find documentation for that class, but it is form the random number generator i wish to use, so i'm kinda flying by the seat of my pants here.
I looked around some more, and I have no idea whatsoever how to fix this. It's most likely just some simple thing, but I just can't seem to figure it out. Any help is appreciated.
this is the beginner forumn. Try a different section.
Topic archived. No new replies allowed.