English 中文(简体)
在C++中建立一个两维链接清单物体
原标题:Creating a two-dimension linked list object in C++

我有以下模板和类别:

template<class T>
class LinkedList
{
....
....
}

class Editor
{
private:
LinkedList <LinkedList<char>> doc;   //My Question is how can I implement this? 
int line;
int col;

public:
Editor();
.......
//other functions
......
}

c 如同一份两维链接清单,根据文件行文和栏目保存节点(插栏)。

我的问题是,我如何在编辑班的构造和其他功能中实施和使用“思想”实例?

提前感谢。

问题回答

如果相关名单是模板类别(如现在的),那么,如果你总是确保在某个地点出现第一组人员名单,然后再试图在那个地点填满第二个方面名单,那么你就能够这样做。

与此相关的SO有各种问题(我看到了一些病媒、周围)。

www.un.org/Depts/DGACM/index_spanish.htm 值得注意的是,这里有一小错。

LinkedList<LinkedList<char> >

页: 1 如果您不离开该地,那么汇编者将把它当作一个适当的临时操作员,因为你可能认为你的代码不奏效。

请参看对你问题的评论,但除我完全同意他的所有账户外,还有yn误:





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签