我今天已经决定 - 一旦这个问题得到解答,事实上 - 我将深入学习HTML.
但是,在网上看,我注意到有很多类型:HTML,XHTML,HTML5等.
那么,我应该从哪开始呢?我应该以什么顺序学习它们?
而且,对于第一语言,我应该在哪里学习?
因此,按照建议,我本周末参加了W3Schools HTML和XML教程.我理解基础知识.
现在我应该在HTML中获得更多深度,还是直接学习CSS(并尝试同时学习HTML)?如果是第一个,我应该去哪里寻找更高级的HTML教程?
我搜索了论坛,并尝试在我找到的主题中实现代码.但是我从上午10点左右开始研究这个真正简单的程序,并且无法解决这个问题.我生命的错误.
关于我做错的任何想法都将不胜感激.
BST.h(所有的实现问题都应该在这里,并且已经更新了一些,以反映进一步的开发工作,查看历史记录以查看旧版本.)
#ifndef BST_H_
#define BST_H_
#include <stdexcept>
#include <iostream>
#include "btnode.h"
using namespace std;
/*
A class to represent a templated binary search tree.
*/
template <typename T>
class BST
{
private:
//pointer to the root node in the tree
BTNode<T>* root;
public:
//default constructor to make an empty tree
BST();
/*
You have to document these 4 functions
*/
void insert(T value);
bool search(const T& value) const;
bool search(BTNode<T>* node, const T& value) const;
void printInOrder() const; …Run Code Online (Sandbox Code Playgroud) 这是我正在进行的计划的最后一部分.我想输出一个表格列表的歌曲cout.然后我想将一个特殊格式的歌曲信息列表输出到fout(稍后将用作输入文件).
打印到cout效果很好.问题是在打印到fout时会增加大量的额外字符.
有任何想法吗?
这是代码:
void Playlist::printFile(ofstream &fout, LinkedList<Playlist> &allPlaylists, LinkedList<Songs*> &library)
{
fout.open("music.txt");
if(fout.fail())
{
cout << "Output file failed. Information was not saved." << endl << endl;
}
else
{
if(library.size() > 0)
fout << "LIBRARY" << endl;
for(int i = 0; i < library.size(); i++) // For Loop - "Incremrenting i"-Loop to go through library and print song information.
{
fout << library.at(i)->getSongName() << endl; // Prints song name.
fout << library.at(i)->getArtistName() << endl; // Prints artist name. …Run Code Online (Sandbox Code Playgroud)