0

几个小时以来我一直遇到相同的错误,因此无法检查算法问题,我每次都会遇到相同的错误。代码块错误:

C:\cygwin\home\Ryan\P1311\Playlist.h:19:4: error: 'DoublyLinkedList' does not name a type
C:\cygwin\home\Ryan\P1311\Playlist.h:22:27: error: 'string' has not been declared
C:\cygwin\home\Ryan\P1311\Playlist.h:23:29: error: 'string' has not been declared
C:\cygwin\home\Ryan\P1311\Playlist.h:24:28: error: 'string' has not been declared
C:\cygwin\home\Ryan\P1311\Playlist.h:25:27: error: 'string' has not been declared
C:\cygwin\home\Ryan\P1311\Playlist.h:27:25: error: 'string' has not been declared

进程以状态 1 终止(0 分 0 秒)

注意:我不允许更改 playlist.h 和 playlist.cpp 文件中的任何内容,它们是交给我的任务。

#ifndef CSCI_311_PLAYLIST_H
#define CSCI_311_PLAYLIST_H

class Playlist {
public:
   void mainLoop();                    // process commands until done
private:
   DoublyLinkedList dll;               // playlist stored in doubly linked list

   void processCommand();              // read and process one playlist command
   void processAppendSong(string&);    // appends song to playlist
   void processInsertBefore(string&);  // insert song before current position
   void processInsertAfter(string&);   // insert song after current position
   void processRemoveSong(string&);    // removes the specified song
   void processPlayCurrent();          // "plays" song at the current position
   void processGotoSong(string&);      // sets the current position to song
   void processGotoFirstSong();        // goes to the first song
   void processGotoLastSong();         // goes to the last song
   void processNextSong();             // go to next song
   void processPrevSong();             // go to previous song
   void processPlayForward();          // "play" all songs from current to end
   void processPlayReverse();          // "play" all songs from current to start
};

#endif // CSCI_311_PLAYLIST_H
4

0 回答 0