468,513 Members | 1,759 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

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 4972
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
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.