小编use*_*359的帖子

C++模板"类类型"错误

我一直在研究一个链表模板类,用各种变量做同样的事情,并设法解决大部分问题.除非我编译,我得到这些:

g++ -Wall -o template_test template_test.cpp
In file included from template_test.cpp:1:0:
LinkedList.h:50:11: error: declaration of ‘class Type’
LinkedList.h:7:11: error:  shadows template parm ‘class Type’
LinkedList.h:51:30: error: invalid use of incomplete type ‘class LinkedList<Type>’
LinkedList.h:8:7: error: declaration of ‘class LinkedList<Type>’
LinkedList.h:56:11: error: declaration of ‘class Type’
LinkedList.h:7:11: error:  shadows template parm ‘class Type’
LinkedList.h:57:51: error: invalid use of incomplete type ‘class LinkedList<Type>’
LinkedList.h:8:7: error: declaration of ‘class LinkedList<Type>’
LinkedList.h:92:11: error: declaration of ‘class Type’
LinkedList.h:7:11: error:  shadows template parm ‘class Type’ …
Run Code Online (Sandbox Code Playgroud)

c++ templates compiler-errors class linked-list

6
推荐指数
1
解决办法
5377
查看次数

在Racket中列出字符串

我有一个像这样定义的列表:

(define testlist '((Dog <=> Cat)
                   (Anne <=> Dodd))
Run Code Online (Sandbox Code Playgroud)

有没有办法转:(car testlist)进入一个字符串所以我可以使用regexp来搜索"<=>"?

lisp regex arrays string racket

1
推荐指数
1
解决办法
173
查看次数

标签 统计

arrays ×1

c++ ×1

class ×1

compiler-errors ×1

linked-list ×1

lisp ×1

racket ×1

regex ×1

string ×1

templates ×1