• Advertisement
Sign in to follow this  

need help with very simple function

This topic is 4232 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

int LoadIm(IDirectDrawSurface7 *pdd, string imagename, int tc1,int tc2,int tc3) { IDirectDrawSurface7 *pdds; pdds = DDLoadBitmap(g_pdd,"imagename.C_str()",0,0); DDSetColorKey(pdds,RGB(tc1,tc2,tc3)); } LoadIm(g_pdda,Paddle2.bmp,0,255,0); I am getting error main.cpp:609: error: expected constructor, destructor, or type conversion before '(' token main.cpp:609: error: expected `,' or `;' before '(' token can any one give me an idea why I would get that error?

Share this post


Link to post
Share on other sites
Advertisement
"Paddle2.bmp" should be in quotes, since it is a string.

Also, "imagename.C_str" should just be imagename.c_str().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement