Mixing C++ and Obj-C
Mixing C++ and Obj-C
- Subject: Mixing C++ and Obj-C
- From: James Pengra <email@hidden>
- Date: Sat, 16 Jan 2010 10:53:02 -0800
In an effort to work with Core Audio I want to write a Cocoa
program that includes C++ classes. As a test I included the following
simple class in my Cocoa program:
The header is:
class Calbak
{
public:
Calbak();
virtual ~Calbak();
int MyCallBack( int var1, int var2 );
};
The .cpp file is:
#include "Calbak.h"
Calbak::Calbak()
{
}
Calbak::~Calbak()
{
}
int Calbak::MyCallBack( int var1, int var2 )
{
return var1;
}
When I build the program, it rejects the first statement in the
header "class Calbak" saying that it expected some symbol or
attribute before 'Calbak'.
Can anyone tell me what's wrong with this, or point me to
documentation for mixing C++ and Obj-C classes.
Thanks, Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden