while I am doing my project I got this error while finding word in tries Dsa
public List auto_complition(string word)
{
var item = find_word(word);
if (item != null)
{
return auto_complition(item, word, new List());
}
return new List { word };
}
private List auto_complition(Node item, string word, List words)
{
foreach (var items in item.getchildren())
{
}
return new List { word };
}
public Node find_word(string ch)
{
if (ch == null)
{
return null!;
}
return find_word(root, ch, 0);
}
private Node find_word(Node root, string ch, int index)
{
foreach (var item in root.getchildren())
{
if (item.value == ch[index] && index != ch.Length - 1)
{
if (index == ch.Length && item.isendofword)
{
return item;
}
find_word(item, ch, index + 1);
}
}
return null!;
}
это моя ошибка!
Код серьезности Описание Состояние подавления строки файла проекта
Ошибка (активная) CS0050 Несовместимая доступность: тип возвращаемого значения ' Tries.Node» менее доступен, чем метод «Tries.find_word(string)» ConsoleApp1 D:\folder1\ConsoleApp1\Tries.cs 167
[code]while I am doing my project I got this error while finding word in tries Dsa
public List auto_complition(string word) { var item = find_word(word); if (item != null) { return auto_complition(item, word, new List()); } return new List { word }; } private List auto_complition(Node item, string word, List words) { foreach (var items in item.getchildren()) {
} return new List { word }; } public Node find_word(string ch) { if (ch == null) { return null!; } return find_word(root, ch, 0); } private Node find_word(Node root, string ch, int index) { foreach (var item in root.getchildren()) { if (item.value == ch[index] && index != ch.Length - 1) { if (index == ch.Length && item.isendofword) { return item; } find_word(item, ch, index + 1); } } return null!; } [/code] это моя ошибка! Код серьезности Описание Состояние подавления строки файла проекта Ошибка (активная) CS0050 Несовместимая доступность: тип возвращаемого значения ' Tries.Node» менее доступен, чем метод «Tries.find_word(string)» ConsoleApp1 D:\folder1\ConsoleApp1\Tries.cs 167
Я пытаюсь найти слово в попытках:
public List auto_complition(string word)
{
var item = find_word(word);
if (item != null)
{
return auto_complition(item, word, new List());
}
return new List { word };
}
private List auto_complition(Node item,...
фон
разрешение Saw (системное окно оповещения) может использоваться для рисования контента поверх других приложений.
Мне сказали очень Давным -давно эта служба доступности тоже может сделать это, но я никогда не находил ни одного учебника,...
Итак, у меня есть абстрактный базовый класс в классах DLL и ребенка этого класса. Я хочу, чтобы дети были публичными, но базовая была личной, чтобы к ней нельзя было получить доступ за пределами DLL.
Я запускаю очень простой запрос на двух разных серверах, на двух разных версиях PHP и получаю противоречивые результаты. Я могу изменить свой запрос, чтобы получить последовательные результаты, поэтому я выяснил Что пошло не так, но я бы хотел,...