not declared

Started by
4 comments, last by Lactose 7 years, 1 month ago

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

Advertisement

std::string myText;
XSBGetTextFromClipboard(myText);

Hello to all my stalkers.


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

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.

Hello to all my stalkers.

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 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 :)

Hello to all my stalkers.

This topic is closed to new replies.

Advertisement