16,004,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by gvsk (Top 12 by date)
gvsk
28-Mar-18 1:28am
View
After implementing std::map<string, Chassis>, Can I get values of instances for struct type "Chassis". How can I get chassis1.InLED from this mapping?
gvsk
27-Feb-18 0:21am
View
Hi
In the answer that I have updated, I have mapped string to structure instance like "IndicatorLED" to "chassis1.InLED". Instead is there any possibility to map using structure type itself using "Chassis". ("Chassis" instead of "chassis1").
gvsk
23-Feb-18 4:17am
View
Deleted
In the answer updated by me, I have mapped "IndicatorLED" to chassis1.InLED. But is there any possibility in mapping "IndicatorLED" to using structure type(name) not by the instance. Like using Chassis (struct name itself) for mapping.
gvsk
22-Feb-18 10:25am
View
Deleted
Thank you very much..
Yesterday I have found solution for this.
But today I am OOO. Will update that tomorrow.
gvsk
21-Feb-18 3:52am
View
I really appreciate your answers. But I am new to CPP. I want to implement that string variant mapping. Can you Please provide me with an example.
Thank you very much..
gvsk
21-Feb-18 3:52am
View
Deleted
I really appreciate your answers. But I am new CPP. I dint find some examples for string-string map for structures. Please provide me with an example.
Thank you very much..
gvsk
21-Feb-18 3:32am
View
Sorry, I dint understand. Can you please provide some sample code
gvsk
20-Feb-18 22:05pm
View
Can you please provide example code for small use case?
I have did this:
#include <iostream>
#include <string>
#include
using namespace std;
struct Chassis
{
string InLED;
};
int main()
{
Chassis chassis1={"on"};
string item="IndicatorLED";
map<string, Chassis> cha1;
cha1["IndicatorLED"] = chassis1;
if(cha1.find(item) == cha1.end()) {cout <<"not there";}
else {cout <<cha1[item].InLED ;}
return 0;
}
Here I can map that string variable("IndicatorLED") to structure but cannot map it to that member (InLED).
The requirement is to map string variable to particular member in the structure.
gvsk
20-Feb-18 11:30am
View
Sir, Please help me in this issue. Had same issue if you have any solution.
Searched and attempted many lot procedures.
Please mail me at sundeepgorantla95@gmail.com
gvsk
20-Feb-18 11:20am
View
@shanmuga sir, I want to contact you regarding a concept you have posted long back..can you please provide your mail or just drop me a mail @ sundeepgorantla95@gmail.com
gvsk
20-Feb-18 11:19am
View
Deleted
@shanmuga sir, I want to contact you regarding a concept you have posted long back..can you please provide your mail or just drop me a mail @ sundeepgorantla95@gmail.com
gvsk
19-Feb-18 6:26am
View
Deleted
Hi
Did you get solution for this problem?
Stuck with same problem.
Show More