64,675
社区成员
发帖
与我相关
我的任务
分享
#ifndef _POOR_H_
#define _POOR_H_
using namespace std;
//池
template<class D>
class Poor
{
public:
Poor();
~Poor();
};
#endif
#include "poor.h"
template<class D>
Poor<D>::Poor()
{
}
template<class D>
Poor<D>::~Poor()
{
}
typedef struct
{
int key;
char value[20];
} stParseMap;
int main (int argc,char *argv[])
{
Poor<stParseMap> *b = new Poor<stParseMap>();//该行编译报错
return 0;
}
#!/bin/ksh
IFLAGS=-DSS_64BIT_SERVER -D_REENTRANT -D_DSCI_ -D_THREAD_LOG_ -D_DEBUG_INFO_ -D_TIME_LOG_
INCLUDE=-I.
LIB=-L.
.SUFFIXES:.cpp .o
CFLAGS = ${IFLAGS} ${INCLUDE}
CC=g++ -m64 -g -O2 -fpermissive
OBJ = ibeartest.o poor.o
BIN=ibeartest
all:${BIN} install clean
.cpp.o:
echo "Compiling the $<"
$(CC) -c ${CFLAGS} $<
.c.o:
echo "Compiling the $<"
$(CC) -c ${CFLAGS} $<
clean:
rm -f ibeartest.o poor.o
######################################################################
${BIN}: $(OBJ)
$(CC) ${CFLAGS} -o $@ $? ${LIB}
######################################################################
install: