Advertisement

05.27.2008 at 08:46AM PDT, ID: 23435241 | Points: 125
[x]
Attachment Details

again EEROR 2664:  convert Tchar *   .....

Asked by BdLm in C++ Programming Language

again I get a compiler error:
.\mainV4.cpp(356) : error C2664: 'str2graphtype': Konvertierung des Parameters 1 von '_TCHAR *' in 'std::string' nicht möglich

with these lines of code:
enum graphtype {node_graph, component_graph, bipartit_graph};
 
   graphtype    mygraphtype;

   mygraphtype = str2graphtype(argv[optind]);  // ->  fails with  the Compiler option release
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Lib Function:
-------------
 
graphtype str2graphtype(std::string aString)
{
 
    char   aChar;
 
	aChar = aString.at(0);
 
	switch(aChar)
    {
	case 'n':
		return node_graph;
		break;	
	case 'c':  
		 return component_graph;
         break;
	case 'b':
		 return bipartit_graph;
		break;
	default:
       return bipartit_graph;
	}
}
 
Keywords: again EEROR 2664: convert Tcha…
 
Loading Advertisement...
 
[+][-]05.27.2008 at 08:56AM PDT, ID: 21652981

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 10:11AM PDT, ID: 21653635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 10:59AM PDT, ID: 21654070

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 11:17AM PDT, ID: 21654255

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 12:07PM PDT, ID: 21654635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 12:23PM PDT, ID: 21654787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 01:02PM PDT, ID: 21655165

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 01:12PM PDT, ID: 21655253

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628