In a C++Builder project, I want to store names of people together with a floating point number for each of them. I tried to write TFloatNum, a simple class for storing a float. Later on in the code I use that class.
The compiler gives an error about the line with AddObject: E2188 Expression syntax
I guess something is wrong with the TFloatNum class, because when I write the following, it compiles without errors:
StringList1->AddObject("John Jones", Button1);
What am I doing wrong?
Thanks for looking into this.
When I try: StringList1->AddObject("John Jones", *G);
it gives two errors:
E2034 Cannot convert TFloatNum to TObject*
E2342 Type mismatch in parameter AObject (wanted TObject*, got TFloatNum)