I am new to C++ and programming and I'm writing a small program as part of an assignment and got it to work, but I am trying to make the code run faster, so i'm trying to get my vector to store a pointer to a struct.
The struct is
struct info {
string all;
string word;
}
And what I did was, trying to assign the string 'all' a value;
info* v;
v->all = str;
And str is defined as
string str = "Hello";
The error that I got upon running GDB was;
File "/usr/share/gdb/python/libstdcxx/v6/printers.py", line 469, in to_string
return self.val['_M_dataplus']['_M_p'].string (encoding, length = len)
OverflowError: signed integer is greater than maximum
Any clue as to what might be causing this?