The variable name "q", "operate", "hello", whatever is in no way stored in the object so can't be used in that way.
Blockland's system (which I assume you're trying to replicate) of something like
%scriptObject.setName("Hello"); ("Hello").doThings(); does not happen by default unless you make something like the key/value map as I/Skele mentioned.
I'm not sure about the test program I tried - it works for me but it's partly set up for SDL and this "C++0x" new standard because the features looked cool.
Skele's link there is very useful, usually it's the first result if you look up something like "C++ vector" or "C++ map" so easy to look up what you need. Here's one of their examples of what the key/value map does (to see if it's what you're trying to make)
// map::find
#include <iostream>
#include <map>
using namespace std;
int main ()
{
map<char,int> mymap;
map<char,int>::iterator it;
mymap['a']=50;
mymap['b']=100;
mymap['c']=150;
mymap['d']=200;
it=mymap.find('b');
mymap.erase (it);
mymap.erase (mymap.find('d'));
// print content:
cout << "elements in mymap:" << endl;
cout << "a => " << mymap.find('a')->second << endl;
cout << "c => " << mymap.find('c')->second << endl;
return 0;
}
elements in mymap:
a => 50
c => 150