Menu

*** Error itfile.cpp : Wrong type

2006-08-17
2012-09-15
  • Ricardo Gandia

    Ricardo Gandia - 2006-08-17

    Hi all,

    I've just installed the lastest itpp version and I found something odd when reading data from an "it" file.

    Basically, running a program like this:

    include <stdio.h>

    include <stdlib.h>

    include <itpp/itbase.h>

    using namespace itpp;

    int main(int argc, char *argv[])
    {
    // write data into file
    it_file my_file1("my_file_name.it");
    vec a = "1.0 2.0 3.0 4.0";
    my_file1 << Name("a") << a;

    // read data from file
    it_file my_file2("my_file_name.it");
    vec b;
    my_file2 >> Name("a") >> b;
    std::cout << "a = " << b << std::endl;

    return(0);
    

    }

    triggers the message

    *** Error in ../../itpp/base/itfile.cpp on line 966:Wrong type
    Aborted

    after trying to run line
    my_file2 >> Name("a") >> b;

    any help would be appreciated.

    cheers,
    Ricardo Gandia

     

Log in to post a comment.