Ask a Question related to Mac Programming, Design and Development.
-
Will Oram #1
PB & Implementation Files & C++
Hi,
I'm trying out PB for a C++ class at school. The program in question
needs a main file and implementation file (.cpp) and a header file (.h).
This is a two-part question of sorts: with and without namespaces.
With namespaces, PB fails to recognise any standard library items,
particularly NULL and cout...despite the presence of "using namespace
std;". Specifically:
#include "header.h"
using namespace std;
namespace SomeStupidName {
AnotherClass::AnotherClass() {
int *myPointer = NULL; // error here
cout << "stuff\n"; // error here
} }
}
This is a simplified example of what I copied straight from the textbook,
namespaces and all. CodeWarrior also fails to recognise anything in
stdlib.
A friend suggested stripping out the namespaces. I did that, leaving the
header file to look like this:
class AnotherClass {
public:
//Constructor
AnotherClass();
};
PB now complains that AnotherClass was redefined. I'm not aware of a
previous definition of AnotherClass, so this is indeed a strange error.
What am I/my textbook doing wrong? Is this a combined PB/CodeWarrior
quirk, perhaps? What can I do to get around this?
Keep in mind I might have made an error in editing the sample code above;
the real code is unnecessarily complicated for viewing audiences.
If you need further info I will be glad to help. Thanks.
Will Oram Guest
-
web cam implementation
Hello: Does anyone know of a way to implement a web cam with 30 second interval picture updates? This would be placed in a studio setting (radio)... -
MD5 implementation
I need to use MD5 to generate a hash of a string. It needs to be compatible with the MD5 implementation in PHP. public string ComputeMD5(string... -
RSA implementation for PHP
Hi @ll, Is there a RSA library for php available? Has somebody any samples to decrypt a encrypted message with the public key given in a... -
RSA implementation of PHP
Hi @ll, Is there a RSA library for php available? Has somebody any samples to decrypt a encrypted message with the public key given in a... -
NAT implementation on AIX 5.x
Hi: I have a need to write my own version of NAT for AIX 5.x. I have been able to do this on HP-UX by using a STREAMS module and DLPI approach....



Reply With Quote

