This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi TI,
I am using TMS570LS0432 with CCS v6.1.0.00104 and Compiler version TI v5.2.3.
In this environment I want to use map(string,char) template to create a Hash Table or else it will be huge lines of code if I do on my own.
But I don't know how. When I compile after I include map file in my main.c, compiler shows bulge error statements.
Please anybody explain how to use the STL (Standard Template Library) in my Project in the CCS environment.
Expecting a guidance.
Thanks in advance.
Regards,
Karthikeyan Kasi Vishwanathan
Karthikeyan,
This seems to be a Compiler question. I've informed the Codegen team and they will be back to you shortly.
The C++ library provides excellent features for creating a hash table. The TI ARM compiler supports those features. It would be better for you to learn about those features with material specifically dedicated to that purpose.
My first recommendation is the book The C++ Standard Library by Nicolai M. Josuttis. Start with section 5.2.2 on Associative Containers.
If you want something off the web right now, I recommend you search on c++ map associative array. Those links look promising.
Thanks and regards,
-George
Karthikeyan Kasi Vishwanathan said:In this environment I want to use map(string,char) template to create a Hash Table or else it will be huge lines of code if I do on my own.
But I don't know how. When I compile after I include map file in my main.c, compiler shows bulge error statements.
One thing you might try is to change the file from main.c to main.cpp.
The TI cgt is both a C and C++ compiler. One convention is that files ending in ".c" are treated as C files, files ending in ".cpp" are C++ files. Because the STL is part of the C++ standard library, you will want a C++ extension for the the file.
e.g. main.cpp
#include <map> int main() { std::map<int, int> m; return 0; }