gcc test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux