1 solution 2 projects; how to use a function from project B into project A

U

unknown;

hello,

i've got a question about using a function from project B in project A.
The projects are both in the same solution (using Microsolft Visual
Studio 2005)
the projects ara both native C++.

i've already added a reffrence from projectB into projectA.

i've got a function in projectA:
mainClass.cpp:
int main ()
{
int i = 0;
// i want to use function from project B like this:
// i = functionFromProjectB (10);
return i;
}


and in project B:
fileX.cpp:
int functionFromProjectB (int i)
{
return i * 4;
}



i know, the example is a little stange but it may be usefull to explain
my problem.
 
G

Geo

unknown; said:
hello,

i've got a question about using a function from project B in project A.
The projects are both in the same solution (using Microsolft Visual
Studio 2005)
the projects ara both native C++.

i've already added a reffrence from projectB into projectA.

i've got a function in projectA:
mainClass.cpp:
int main ()
{
int i = 0;
// i want to use function from project B like this:
// i = functionFromProjectB (10);
return i;
}


and in project B:
fileX.cpp:
int functionFromProjectB (int i)
{
return i * 4;
}



i know, the example is a little stange but it may be usefull to explain
my problem.

Maybe it's me, but I can't actually see a question !

Anyway, if there is one in there it is certainly OFF TOPIC, you need to
find a "Microsolft Visual Studio 2005" (sic) related newsgroup
 
U

unknown;

you're right.
i've just posted this message in an other topic.
thanks anyway


Geo schreef:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top