[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined reference link errors
From: |
Srini |
Subject: |
Re: undefined reference link errors |
Date: |
16 Mar 2005 19:41:28 -0800 |
User-agent: |
G2/0.2 |
okay - here are my buffer.h and buffer.cpp files
-- buffer.h --
#ifndef _BUFFER_H_
#define _BUFFER_H_
#include "typedefs.h"
// Place holder ONLY!!
#define BLOCK_SIZE 256
class Buffer
{
public:
Buffer();
Buffer(ULong fillPattern);
~Buffer();
private:
UInt length;
char buf[BLOCK_SIZE]; // Need to define BLOCK_SIZE somewhere
appropriate
};
#endif
-- buffer.cpp --
#include "buffer.h"
#include <cstring>
using std::memcpy;
#ifdef DEBUG
#include <iostream>
#endif
/*************** Construction & Destruction *************/
inline Buffer::Buffer()
: length(BLOCK_SIZE)
{ }
Buffer::Buffer(ULong fillPattern /*, UInt len */)
: length(BLOCK_SIZE /*len */)
{
for(int i = 0; i < length; i += sizeof(ULong))
{
memcpy( buf+i , &fillPattern , sizeof(ULong) );
}
#ifdef DEBUG
for(int i = 0 ; i < 2*sizeof(ULong) ; i += 4)
{
ULong *tmp = reinterpret_cast<ULong *>(buf+i);
std::cout << std::hex << *tmp << " " ;
}
#endif
}
Buffer::~Buffer()
{ }
------
What about those other errors concerning Configuration::theObject and 2
other Configuration functions?
Thanks for your reply...