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

Discussion in 'C++' started by unknown;, Dec 18, 2006.

  1. unknown;

    unknown; Guest

    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.
    unknown;, Dec 18, 2006
    #1
    1. Advertising

  2. unknown;

    Geo Guest

    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
    Geo, Dec 18, 2006
    #2
    1. Advertising

  3. unknown;

    unknown; Guest

    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
    unknown;, Dec 18, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jaredea

    Can't create projects / open projects

    jaredea, Jun 9, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    559
    =?Utf-8?B?TWFyaWU=?=
    Aug 10, 2005
  2. DLG
    Replies:
    4
    Views:
    509
  3. Replies:
    4
    Views:
    934
    Timo Stamm
    Feb 24, 2006
  4. Replies:
    0
    Views:
    399
  5. sumit chawla
    Replies:
    1
    Views:
    523
    Thomas Matthews
    Jul 13, 2004
Loading...

Share This Page