By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,804 Members | 1,634 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,804 IT Pros & Developers. It's quick & easy.

can't convert char* to const char* !?

P: n/a
GLcharARB* pC;
glShaderSourceARB(m_Shaders[index][2], 1, &pC, NULL);

error C2664: 'void (GLhandleARB,GLsizei,const GLcharARB ** ,const
GLint *)' :
cannot convert parameter 3 from 'GLcharARB **__w64 '
to 'const GLcharARB ** '
Conversion loses qualifiers

This works:
const GLcharARB** ppA;
memcpy(&ppA, &pVert, sizeof(char*));
glShaderSourceARB(m_Shaders[index][1], 1, ppA, NULL);

What have I done?

Using VC7.1 here.

--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}


Sep 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Gernot Frisch <Me@privacy.netwrote:
GLcharARB* pC;
glShaderSourceARB(m_Shaders[index][2], 1, &pC, NULL);

error C2664: 'void (GLhandleARB,GLsizei,const GLcharARB ** ,const
GLint *)' :
cannot convert parameter 3 from 'GLcharARB **__w64 '
to 'const GLcharARB ** '
Conversion loses qualifiers
This is covered in the FAQ:
http://www.parashift.com/c++-faq-lit...html#faq-18.17

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Sep 25 '06 #2

P: n/a
Gernot Frisch wrote:
cannot convert parameter 3 from 'GLcharARB **__w64 '
to 'const GLcharARB ** '
Conversion loses qualifiers
[ snip ]
What have I done?
You lied in your subject line.

Sep 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.