By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,445 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,445 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Dec 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Geo

unknown; wrote:
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

Dec 18 '06 #2

P: n/a
you're right.
i've just posted this message in an other topic.
thanks anyway
Geo schreef:
unknown; wrote:
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
Dec 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.