Jump to content
  • Advertisement
Sign in to follow this  
mike44

not declared

This topic is 564 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

Hi

define like:

bool    XSBGetTextFromClipboard(std::string& outText);

declared:

bool    XSBGetTextFromClipboard(std::string& outText)
{

etc.

...

}

but how to call?

XSBGetTextFromClipboard(*outText);

it says outText not to be declared. Many thanks and regards

 

Share this post


Link to post
Share on other sites
Advertisement


define like:

bool    XSBGetTextFromClipboard(std::string& outText);

declared:

bool    XSBGetTextFromClipboard(std::string& outText)
{

etc.

...

}

It's the other way around, "declare" is saying "XSBGetTextFromClipboard" exists (and the implementation comes later)

"define" is saying "XSBGetTextFromClipboard" must be computed in this and this way.

 

http://www.cprogramming.com/declare_vs_define.html

Share this post


Link to post
Share on other sites

It's the other way around, "declare" is saying "XSBGetTextFromClipboard" exists (and the implementation comes later) "define" is saying "XSBGetTextFromClipboard" must be computed in this and this way.

That's true, but the main issue here is that the function expects a reference to a std::string, but mike44 seemed to be trying to pass something invalid (just copying the argument name and trying to dereference it).

It's outText that's undeclared, in his description. 

Share this post


Link to post
Share on other sites

I know that he said outText not being available, but you seemed to have covered that already, no point in going over that again.

I see, fair enough :) 

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!