471,850 Members | 861 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,850 software developers and data experts.

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

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
2 5096
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
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.

Similar topics

1 post views Thread by Sam Smith | last post: by
5 posts views Thread by Brad Moore | last post: by
3 posts views Thread by Siemel Naran | last post: by
1 post views Thread by Steven Woody | last post: by
14 posts views Thread by rtillmore | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.