This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc test


Can I ask a dumb question? How do I compile & link this test? I must be
doing something wrong.

tst.cpp:

#include <stdio.h>
#include "blackbox.h"

int main()
{
    printf("Hello, ");
    Mike();
    printf("Hello, ");
    Michael();
};

blackbox.h:

void Mike();
void Michael();

class BlackBox
{
public:
    void Mike();
    void Michael();
};

blackbox.cpp:

#include <stdio.h>

class BlackBox
{
public:
    void Mike()
    {
        printf("Mike\n");
    };
    void Michael()
    {
        printf("Michael\n");
    }
};

Mike Vandeman
925-901-7270



Mike Vandeman
925-901-7270


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]